#include using namespace std; constexpr int_fast64_t pow(int_fast64_t a, uint_fast64_t n, const uint_fast64_t MOD) { int_fast64_t ret = 1; while(n > 0) { if(n & 1) { ret = ret * a; if(ret >= MOD) { ret %= static_cast(MOD); } } a = a * a; if(a >= MOD) { a %= static_cast(MOD); } n >>= 1ULL; } return ret; } int main() { int _2 = 0; for(int i = 0; i < 3; ++i) { int a, b; cin >> a >> b; _2 += pow(a, b, 2); } _2 %= 2; cout << (_2 ? ":-(" : ":-)") << '\n'; return 0; }