Problem2395--Full House

2395: Full House

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Time Limit: 2 sec / Memory Limit: 1024 MB

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

  • 1 \leq A,B,C,D,E\leq 131≤A,B,C,D,E≤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:
AABBCCDDEE

Output

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

Sample Input Copy

1 2 1 2 1

Sample Output Copy

Yes

Source/Category