import sys
array = list(map(int,input().split()))
set_array = set(array)

if not ( 1 <= min(array) and max(array) <= 9 ): sys.exit()

print('Yes') if len(set_array) == 2 else print('No') import sys sys array = list(map(int,input().split())) array list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split set_array = set(array) set_array set(array) set array if not ( 1 <= min(array) and max(array) <= 9 ): sys.exit() not ( 1 <= min(array) and max(array) <= 9 ) 1 <= min(array) and max(array) <= 9 1 <= min(array) 1 min(array) min array max(array) <= 9 max(array) max array 9 print('Yes') if len(set_array) == 2 else print('No') len(set_array) == 2 len(set_array) len set_array 2 print('Yes') print 'Yes' print('No') print 'No' set_array = set(array) set(array) set_array array = list(map(int,input().split())) list(map(int,input().split())) array
import sys
array = list(map(int,input().split()))
set_array = set(array)

if not ( 1 <= min(array) and max(array) <= 9 ): sys.exit()

print('Yes') if len(set_array) == 2 else print('No')