Emily bought 8 books for a total of $440. math books cost $70 and science books cost $50. how many of each type did she buy