Mie and Miko had an equal amount of money. Mie spent $145 and Miko spent $64. After that, Miko had 4 times as much money left as Mie. How much did each of them have at first?