David has 574 cereal bars that he wants to fit in bags of 10 and bags of 8. The number of bags of 8 is 2 more than the number bags of 10. How many bags of 8 and 10 can david pack the cereal bar into