using System; using System.Numerics; namespace _0892 { class Program { static void Main(string[] args) { var _ = Console.ReadLine().Split(); var a = new int[3]; var b = new int[3]; a[0] = int.Parse(_[0]); b[0] = int.Parse(_[1]); a[1] = int.Parse(_[2]); b[1] = int.Parse(_[3]); a[2] = int.Parse(_[4]); b[2] = int.Parse(_[5]); BigInteger ans = 0; for(var i = 0; i < 3; i++){ BigInteger x = 1; for(var j = 0; j < b[i]; j++){ x *= a[i]; } ans += x; } Console.WriteLine(ans % 2 == 0 ? ":-)" : ":-("); } } }