問題一覧 > 通常問題

No.892 Tapioca

レベル : / AI推定難易度 : 133 / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 515
作問者 : nmnmnmnmnmnmnm / テスター : yuki2006
お気に入りにしたユーザー ProblemId : 3138 / 自分の提出
問題文最終更新日: 2019-06-15 15:05:55
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 225 (順位表) の他の問題:

Problem Statement

There are 3 bottles of tapioca milk tea.
The $i$-th bottle of tapioca milk tea contains $A_i^{B_i}$ tapioca pearls.
Yuki and Taro want to take out all the tapioca pearls and divide them equally between the 2 of them.
Determine whether they can be divided equally.

* The appearance of the tapioca pearls is important. Do not cut them; always divide them in units of 1 pearl.

Input

$A_1$ $B_1$ $A_2$ $B_2$ $A_3$ $B_3$

$A_i$ and $B_i$ are both positive integers. $1 \le A_i,B_i \le 1000000000=10^9$.

Output

Print ":-)" if they can be divided equally, and ":-(" if they cannot.
Print a newline at the end.

Sample

Sample 1
Input
2 1 2 1 2 2
Output
:-)

$2^1$+$2^1$+$2^2$=8 tapioca pearls can be taken out.
They can be divided into 4 and 4 pearls, which is equal.

Sample 2
Input
1 1 1 1 1 1
Output
:-(

$1^1$+$1^1$+$1^1$=3 tapioca pearls can be taken out.
They can be divided into 1 and 2 pearls, but this is not equal.

Sample 3
Input
68 7 28 31 34 10
Output
:-)

$68^7$+$28^{31}$+$34^{10}$=727610523382138084983196530619930927544058880 tapioca pearls can be taken out.
They can be divided into 363805261691069042491598265309965463772029440 and 363805261691069042491598265309965463772029440 pearls, which is equal.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。