Greg went to the walmart to buy pencils and pens. each pencils costs $2 and each pen costs $3. he bought five items. he spent $12. how many pens and pencils did he buy?