There are a total of 18 monkeys and orangutans in a primate habitat. The monkeys each eat 5 bananas a day, and the orangutans eat 8 bananas a day. Each day the monkeys and orangutans together eat 111 bananas. How many monkeys and orangutans are in the habitat?