A factory has two machines, A and B. Each day, machine A can make 30 items and consumes 100 kWh. Machine B can make 50 items and consumes 120 kWh per day. The factory must produce at least 1000 items per day and has 3000 kWh of electricity available per day. Since there are not many workers that can operate both machines, at most 30% of the machines must be of type B. Further, at least 5 machines of type A should be used. How many of each machine should be used to minimize the total number of machines?