#abc355a. A - Who Ate the Cake?

A - Who Ate the Cake?

Score : 100100 points

问题陈述

高桥的蛋糕被人吃了。有三个嫌疑人:人 11,人 22,和人 33

有两个证人,林果和斯努克。林果记得人 AA 不是罪犯,斯努克记得人 BB 不是罪犯。

根据两个证人的记忆,确定是否可以唯一确定罪犯。如果可以确定罪犯,请打印出这个人的编号。

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

Takahashi's cake has been eaten by someone. There are three suspects: person 11, person 22, and person 33.

There are two witnesses, Ringo and Snuke. Ringo remembers that person AA is not the culprit, and Snuke remembers that person BB is not the culprit.

Determine if the culprit can be uniquely identified based on the memories of the two witnesses. If the culprit can be identified, print the person's number.

Constraints

  • 1A,B31 \leq A, B \leq 3
  • All input values are integers.

Input

The input is given from Standard Input in the following format:

AA BB

Output

If the culprit can be uniquely identified based on the memories of the two witnesses, print the person's number; otherwise, print -1.

Sample Input 1

1 2

Sample Output 1

3

From the memories of the two witnesses, it can be determined that person 33 is the culprit.

Sample Input 2

1 1

Sample Output 2

-1

From the memories of the two witnesses, it cannot be determined whether person 22 or person 33 is the culprit. Therefore, print -1.

Sample Input 3

3 1

Sample Output 3

2