Gabi is working on a certain number of science problems and humanities problems for homework. It takes her three minutes to finish one science problem, and five minutes to finish one humanities problem. Gabi solved 20 problems altogether, and spent a total of 165 minutes. How many science problems did she have, and how many humanities problems did she have?