using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Numerics; class Program { static void Main() { checked { long n = long.Parse(Console.ReadLine()); if (n < 0) { n *= (-1); } long evenSum = 0; long oddSum = 0; long currentNumber = n; for (int i = 0; i < n; i++) { long currentDigit = 0; long num = currentNumber; currentDigit = currentNumber % 10; currentNumber = currentNumber / 10; if (currentDigit % 2 == 0) { evenSum += currentDigit; } else if (currentDigit % 2 == 1) { oddSum += currentDigit; } if (currentNumber<10 && currentDigit<=0) { break; } } if (evenSum == oddSum) { Console.WriteLine("both {0}", evenSum); } else if (evenSum > oddSum) { Console.WriteLine("apples {0}", evenSum); } else if (evenSum < oddSum) { Console.WriteLine("oranges {0}", oddSum); } } } }