#include using namespace std; typedef long long ll; ll power(int a, int b) { if (b == 0) return 1; if (b % 2 == 1) return power(a, b/2) * power(a, b/2) * a; else return power(a, b/2) * power(a, b/2); } int main() { int a1, b1, a2, b2, a3, b3; cin >> a1 >> b1 >> a2 >> b2 >> a3 >> b3; ll sum = 0; sum += power(a1, b1) + power(a2, b2) + power(a3, b3); if (sum % 2 == 0) cout << ":-)"; else cout << ":-("; cout << endl; return 0; }