#include using namespace std; using i64 = std::int_fast64_t; template T powermod(T x, U n, T mod) { T res = 1; while (n > 0) { if (n & 1) res = res * x % mod; x = x * x % mod; n /= 2; } return res; } int main() { ios::sync_with_stdio(false); cin.tie(0); i64 res = 0; for (int i = 0; i < 3; i++) { i64 a, b; cin >> a >> b; res += powermod(a, b, static_cast(2)); } cout << (res % 2 == 0 ? ":-)" : ":-(") << '\n'; return 0; }