atcoder#ABC263A. [ABC263A] Full House

[ABC263A] Full House

Score : 100100 points

Problem Statement

We have five cards with integers AA, BB, CC, DD, and EE written on them, one on each card.

This set of five cards is called a Full house if and only if the following condition is satisfied:

  • the set has three cards with a same number written on them, and two cards with another same number written on them.

Determine whether the set is a Full house.

Constraints

  • 1A,B,C,D,E131 \leq A,B,C,D,E\leq 13
  • Not all of AA, BB, CC, DD, and EE are the same.
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

AA BB CC DD EE

Output

If the set is a Full house, print Yes; otherwise, print No.

1 2 1 2 1
Yes

The set has three cards with 11 written on them and two cards with 22 written on them, so it is a Full house.

12 12 11 1 2
No

The condition is not satisfied.