A person spent 564 in buying pens and pencils if cost of each pen is 7 and each pencil is 3 and if the total number of things bought was 108, how many of each type did he buy?​