Efrem worked 40 hours at his two jobs last week. He earned $20 per hour at his weekday job and $18 per hour at his weekend. He earned $770 in all. How many hours did he work at each job?