#include #include #include #include #include #include using namespace std; typedef long long int lint; int main() { lint a1, a2, a3, b1, b2, b3; cin >> a1 >> b1 >> a2 >> b2 >> a3 >> b3; if ((lint(pow(a1, b1)) + lint(pow(a2, b2)) + lint(pow(a3, b3))) % 2) { cout << ":-(" << endl; } else { cout << ":-)" << endl; } }