A manufacturing factory pays $ 20 000 yearly to operate several machines. From year 2020 onwards, the yearly maintenance cost for one machine is increased by $ 50, and to maintain the yearly cost at $ 20 000, the factory needs to reduce the number of machines operating by 20%. Calculate the number of machines operating and the maintenance cost for one machine before year 2020.