Problem:


Score : 100 points

Problem Statement

You are given integers A and B, each between 1 and 3 (inclusive).

Determine if there is an integer C between 1 and 3 (inclusive) such that A \times B \times C is an odd number.

Constraints

All values in input are integers.

1 \leq A, B \leq 3

Input

Input is given from Standard Input in the following format:

A B

Output

If there is an integer C between 1 and 3 that satisfies the condition, print Yes; otherwise, print No.

Sample Input 1

3 1

Sample Output 1

Yes

Let C = 3. Then, A \times B \times C = 3 \times 1 \times 3 = 9, which is an odd number.

Sample Input 2

1 2

Sample Output 2

No

Sample Input 3

2 2

Sample Output 3

No



Sample input:
3 1


Sample output:
Yes

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
x=list(map(int,input().split()))
x=[abs(X-c) for c in x]
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)
D=gcd(*x)
print(D)

Submission status: Runtime Error

Solution code:
import fraction
def gcd(a,b):
    c=fraction.gcd(a,b)
    return c
    
n,x0=map(int,input().split())
x=list(map(int,input().split()))
x.append(x0)
x.sort()
w=[]
for i in range(n):
    w.append(x[i+1]-x[i])
k=w[0]
for i in w:
    ans=gcd(k,i)
print(ans)

Submission status: Runtime Error

Solution code:
a. b = map(int, input().split())

if (a * b) % 2 != 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split)
if a%2 == 1 and b%2 == 1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import math
N,X = map(int,input().split())
x = list(map(int,input().split()))

x.append(X)
x.sort()
ans = x[1]-x[0]
for i in range(1,N):
    ans = math.gcd(ans,x[i+1]-x[i])
print(ans)

Submission status: Runtime Error

Solution code:
A,B = [int(x) for x in input().split()]
if(A%2==0 or B%2===0):
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
a,b=map(int,input()split())
print("Yes" if a%2 and b%2 else "No")

Submission status: Runtime Error

Solution code:
print("Yes"if (int(input())+int(input()))%2==0 else"No")

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())
if a % 2 == 1 and b % 2 == 1:
	print('Yes')
else:
	print('No')

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())
if a % 2 == 1 and b % 2 == 1:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())
if a % 2 == 1 && b % 2 == 1:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())
d = "Yes" if (a % 2 == 1 and b % 2 == 1) else "No"
print(d)

Submission status: Runtime Error

Solution code:
from fractions import*;from functools import*;n,x,*a=map(int,open(0).read().split());print(reduce(gcd,[abs(x-i)for i in a]))

Submission status: Runtime Error

Solution code:
A,B=int(input().split())
print("Yes" if (A*B)%1==0 else "No")

Submission status: Runtime Error

Solution code:
list = list(map(int,input().split())
if(list[0]%2 == 1 and list[1]%2 ==1):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import numpy

a, b = map(int, input().split())
c = np.asarray([[1,2,3], [4,5,6]])
if a % 2 == 0 or b % 2 == 0:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
if (a*b) % 2 == 0:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
if a*b % 2 == 0:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
A = input().split()
if A[0] == 2 or A[1] == 2:
    print(No)
else:
    print(Yes)

Submission status: Runtime Error

Solution code:
A,B = int(input().split())
if A == 2 or B == 2:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
a,b=(int(x) for x in input().split())

if a//2==0 and b//2==0:
  print(“YES”)

else:
  (“NO”)

Submission status: Runtime Error

Solution code:
A, B = map(int, input()split())
if (A * B) % 2 == 1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
if a % 2 != 0 and b % 2 != 0:
  print(“Yes”)
else:
  print(“No”)

Submission status: Runtime Error

Solution code:
aimport sys

def main():
  input = sys.stdin.readline
  a, b = map(int, input().split())
  if (a % 2 == 1) and (b % 2 == 1):
    print('Yes')
  else:
    print('No')


if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
ab = list(map(int,input().split()))

if ab in 2:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
N = int(input())
W = [input() for _ in range(N)]
flag = True
b = W[0][-1]
for i in range(1,N): 
  if b == W[i][0]:
    b = W[i][-1]
  else:
    flag = False
    break
    
if int(len(W))!=len(set(W)):
  flag = False

if flag == True:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N=int(input())
s=[input() for i in range(N)]
count=0
if(len(s)!=len(set(s))):
  count=1
else:
  for i in range(N-1):
    len_s=len(s[i])
    if(s[i][len_s-1]!=s[i+1][0]):
      count=1
      break
    else:continue
if(count==0):
	print('Yes')
else:print('No')

Submission status: Runtime Error

Solution code:
import fraction
from functools import reduce

def gcd(numbers):
    return reduce(fraction.gcd, numbers)

N, X = input().split(" ")
N = int(N)
X = int(X)
list = input().split(" ")
ans_list = [abs(X - int(list[i])) for i in range(N)]
print(int(gcd(ans_list)))

Submission status: Runtime Error

Solution code:
H,W = map(int,input().split())

A=[]
for i in range(H):
    A.append(list(map(int,input().split())))

num=0

for i in range(H):
    for j in range(W):
        if i%2==0:
            n=j
        else:
            n=W-1-j
        if A[i][n]%2==1:
            A[i][n]-=1
            if i!=H-1 and (i%2==0 and n==W-1) or (i%2==1 and n==0):
                num+=1
                A[i+1][n]+=1
                print(i+1,n+1,i+2,n+1)
            if (i%2==0 and n!=W-1) or (i%2==1 and n!=0):
                num+=1
                A[i][n+(-1)**(i%2)]+=1
                print(i+1,n+1,i+1,n+1+(-1)**(i%2))

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split(' '))

if sum(num) < 2 or 6 < sum(num):
    raise ValueError('Input value is more than 1 and less than 3.')

print('Yes' if (a * b) % 2 == 1 else "No")

Submission status: Runtime Error

Solution code:
a, b = (map(int, input().split(' ')))

if sum(num) < 2 or 6 < sum(num):
    raise ValueError('Input value is more than 1 and less than 3.')

print('Yes' if (a * b) % 2 == 1 else "No")

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
if a % 2 == 0 or b % 2 == 0:
    print('No')
else:
    print('Yes)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
if A*B%2 == 0:
    print("NO")
else :
    print('YES')

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
if (A*B)%2 == 0:
    print("YES")
else :
    print('NO')

Submission status: Runtime Error

Solution code:
A, B = map(input().split())

if A % 2 == 1 and B % 2 == 1:
    print("Yes")

else:
    print("No")

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
Xi=list(map(int,input().split()))
for i in range(N):
    Xi[i]=abs(Xi[i]-X)
Xi.sort()
D=0
for i in range(N-1):
    if Xi[i]==Xi[i+1]+1 or Xi[i+1]==Xi[i]+1:
        D=1
        break
if D==0:
    D=Xi[0]
    c=0
    a=0
    while c!=1:
        for i in range(N):
            a=0
            if (Xi[i]%D)!=0:
                a=1
                D-=1
                break
        if a==0:
            c=1
print(D)

Submission status: Runtime Error

Solution code:
a.b = map(int,input().split(" "))
if (a * b) % 2 == 1 or (a * b * 3) % 2 == 1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
A,B=map(int,input())
if (A*B)%2==0:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
A,B = map(int, input().split())
if (A = 2) or (B = 2):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
if (A = 2) or (B = 2):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
h,w = list(map(int,input().split()))

mat = []
for i in range(h):
    array = list(map(int,input().split()))
    mat.append(array)

count=0
s=""

for i in range(0,h,1):
    for j in range(w):
        if mat[i][j]%2 !=0:
            mat[i][j]-=1
            count+=1
            if (j+1)==w:
                mat[i+1][j]+=1
                s+=' '.join(map(str,[i+1,j+1,i+2,j+1]))
                s+='\n'
            else:
                mat[i][j+1]+=1
                s+=' '.join(map(str,[i+1,j+1,i+1,j+2]))
                s+='\n'
    
    i+=1
    for j in range(w-1,0,-1):
        if mat[i][j]%2!=0:
            mat[i][j]-=1
            count+=1
            if (j-1)==0:
                mat[i-1][j]+=1
                s+=' '.join(map(str,[i+1,j+1,i,j+1]))
                s+='\n'
            else:
                mat[i][j-1]+=1
                s+=' '.join(map(str,[i+1,j+1,i+1,j]))
                s+='\n'

if h%2!=0:
    i=h-1
    for j in range(w):
        if mat[i][j]%2 !=0:
            if(j+1!=w):
                mat[i][j]-=1
                mat[i][j+1]+=1
                s+=' '.join(map(str,[i+1,j+1,i+1,j+2]))
                s+='\n'
                count+=1                

print(count)
print(s)

Submission status: Runtime Error

Solution code:
h,w = list(map(int,input().split()))

mat = []
for i in range(h):
    array = list(map(int,input().split()))
    mat.append(array)

count=0
s=""

for i in range(0,h//2,2):
    for j in range(w):
        if mat[i][j]%2 !=0:
            mat[i][j]-=1
            count+=1
            if (j+1)==w:
                mat[i+1][j]+=1
                s+=' '.join(map(str,[i+1,j+1,i+2,j+1]))
                s+='\n'
            else:
                mat[i][j+1]+=1
                s+=' '.join(map(str,[i+1,j+1,i+1,j+2]))
                s+='\n'
    
    i+=1
    for j in range(w-1,0,-1):
        if mat[i][j]%2!=0:
            mat[i][j]-=1
            count+=1
            if (j-1)==0:
                mat[i-1][j]+=1
                s+=' '.join(map(str,[i+1,j+1,i,j+1]))
                s+='\n'
            else:
                mat[i][j-1]+=1
                s+=' '.join(map(str,[i+1,j+1,i+1,j]))
                s+='\n'

if h%2!=0:
    i=h-1
    for j in range(w):
        if mat[i][j]%2 !=0:
            if(j+1!=w):
                mat[i][j]-=1
                mat[i][j+1]+=1
                s+=' '.join(map(str,[i+1,j+1,i+1,j+2]))
                s+='\n'
                count+=1                

print(count)
print(s)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
for c in range(1, 4):
    if (a*b*c) % 2 != 0:
        print('Yes')
        exit()
print('No')

Submission status: Runtime Error

Solution code:
n = int(input())

words = []
for i in range(n):
    words.append(input())

ret = "Yes"
if len(set(words)) != n:
    ret = "No"
else:
    for i in range(n-1):
        if words[i][-1] != words[i+1][0]:
            ret = "No"
            break

print(ret)

Submission status: Runtime Error

Solution code:
nums = input()

if '2' in nums:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
s = raw_input()
a, b = s.split()

c = int(a) * int(b)
print 'YES' if c % 2 == 1 else 'NO'

Submission status: Runtime Error

Solution code:
n = int(input())

words = []
for i in range(n):
    words.append(input())

ret = "Yes"
if len(set(words)) != n:
    ret = "No"
else:
    for i in range(n-1):
        if words[i][-1] != words[i+1][0]:
            ret = "No"
            break

print(ret)
##17024960 | nowg's solution for [AtCoder-4250] [Problem A]

Submission status: Runtime Error

Solution code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
n = int(raw_input())
s = []
for _ in xrange(n):
    s.append(raw_input())

ss = set()
last = None
ret = 'Yes'
for w in s:
    if w in ss:
        ret = 'No'
        break
    if last is None:
        ss.add(w)
        last = w
        continue
    if last[-1] != w[0]:
        ret = 'No'
        break
    ss.add(w)
    last = w

print ret
##17024717 | shenweiqiang's solution for [AtCoder-4252] [Problem B]

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

if a == 2 or b == 2:
    print("No")
else:
    print("Yes")
##17024510 | nowg's solution for [AtCoder-4250] [Problem A]

Submission status: Runtime Error

Solution code:
N = int(input())

W = []

W.append(input())

for n in range(N):
    w = input()

    if( w[0] == W[n][-1] and w not in W):
        W.append(w)
        continue

    else:
        print('No')
        exit()

print('Yes')

Submission status: Runtime Error

Solution code:
A, B = map( int, input()split())

D = A * B

if( D % 2 == 1):
  print('Yes')
  
else:
  print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
words = []
for i in range(N) :
    words.append(input())

win = False
for j in range(1, N) :
    if words[j].startswith(words[j-1][-1]) and words[j] not in words[:j]:
       win = True
    else :
        win = False
        break

if win == True :
    print("Yes")
else :
    print("No")

Submission status: Runtime Error

Solution code:
import sys
from functools import reduce
from fractions import gcd


def main():
    n, x = list(map(int, input().split()))
    values = list(map(int, input().split()))
    values.append(x)
    values.sort()
    v = [values[i + 1] - values[i] for i in range(len(values) - 1)]
    res = v[0]
    print(reduce(gcd, v[1:], v[0]))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import sys



if __name__ == "__main__":
    a, b = list(map(int, intput().split()))
    for i in range(1, 3):
        if a * b * i % 2 == 1:
            print('True')

    print('No')

Submission status: Runtime Error

Solution code:
N,X = map(int, input().split())
def myabs(i):
    return abs(i-X)
xlis = list(map(myabs, map(int, input().split())))

from fractions import gcd

res = xlis[0]
for i in xlis:
    if i%res == 0:
        continue
    res = gcd(i,res)

print(res)

Submission status: Runtime Error

Solution code:
def gcd(a, b):
    while b != 0:
        a, b = b, a%b
    return a


def main():
    N, X = map(int, input().split())
    x = [abs(int(i) - X) for i in input().split()] 

    y = x[0]
    for i in range(N):
        if x[i]%y == 0:
            continue
        y = gcd(y, x[i])
    print(y)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a, b = input().split()
print("Yes") if a % 2 != 0 and b % 2 != 0 else print("No")

Submission status: Runtime Error

Solution code:
import sys
n = int (input())
words = []
for i in range (n) :
    words.append(input())
for x in range(len(words)):
    if words.count(words[x]) > 1 or words[x+1][0] != words[x][-1]:
        print("No")
        sys.exit()
    else:
        "Yes"

Submission status: Runtime Error

Solution code:
a,b=[int(input().split())]
if a!=2 and b!=2:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
	if a!=2 and b!=2:
		print("Yes")
	else:
		print("No")

Submission status: Runtime Error

Solution code:
a,b=[int(input().split())]
	if a!=2 and b!=2:
		print("Yes")
	else:
		print("No")

Submission status: Runtime Error

Solution code:
a,b=[int(input())]
	if a!=2 and b!=2:
		print("Yes")
	else:
		print("No")

Submission status: Runtime Error

Solution code:
n=int(input())
s=[]
fla=True
s.append(input())
for i in range(1,n):
    s.append(input())
    if fla :
        if s[i][0]==s[i-1][len(s[i-1])-1]:
            for j in range(i):
                if s[j]==s[i]:
                    fla=False
        else:
            fla=False
if fla:
    print("YES")
else :
    print("NO")

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(2)]
if (a[0] * a[1]) % 2 == 0:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
a,b = [int(input()) for i in range(2)]
if (a * b) % 2 == 0:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
t = map(int, input().split())
if t[0]＊t[1] % 2 == 0:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
t = map(int, input().split())
if t[0]＊t[1] % 2 == 0:
 print("No")
else:
 print("Yes")

Submission status: Runtime Error

Solution code:
t = map(int, input().split())
  if t[0]＊t[1] % 2 == 0:
    print("No")
  else:
    print("Yes")

Submission status: Runtime Error

Solution code:
t = input().split()
  if t[0]＊t[1] % 2 == 0:
    print("No")
  else:
    print("Yes")

Submission status: Runtime Error

Solution code:
def quick_sort(arr):
    left = []
    right = []
    if len(arr) <= 1:
        return arr

    # データの状態に左右されないためにrandom.choice()を用いることもある。
    # ref = random.choice(arr)
    ref = arr[0]
    ref_count = 0

    for ele in arr:
        if ele < ref:
            left.append(ele)
        elif ele > ref:
            right.append(ele)
        else:
            ref_count += 1
    left = quick_sort(left)
    right = quick_sort(right)
    return left + [ref] * ref_count + right

def LCM(m,n):
  for i in range(1,m+1)[::-1]:
    if n%i==0:
      return i
    
N,X=(int(i) for i in input().split(' '))
x=[int(i) for i in input().split(' ')]
x=[X]+x
x=quick_sort(x)
D=abs(x[1]-x[0])
for i in range(N):
  D=LCM(D,abs(x[i+1]-x[i]))
print(D)

Submission status: Runtime Error

Solution code:
def LCM(m,n):
  for i in range(1,m+1)[::-1]:
    if n%i==0:
      return i
    
N,X=(int(i) for i in input().split(' '))
x=[int(i) for i in input().split(' ')]
x=[X]+x
x.sort()
D=x[1]-x[0]
for i in range(N):
  D=LCM(D,x[i+1]-x[i])
print(D)

Submission status: Runtime Error

Solution code:
N=int(input())
W=[]
for i in range(N):
  W.append(input())
for i in range(N-1):
  if W[i][-1] != W[i+1][0]:
    print('No')
    exit()
  for j in range(i+1, N):
    if W[i]==W[j]:
      print('No')
      exit()
print('Yes')

Submission status: Runtime Error

Solution code:
a=int(input())
x=[input()]
flag=0
for i in range(1,a):
    s=input()
    if s in x or x[i-1][len(x[i-1])-1]!=s[0] :
      
        flag=1
    x.append(s)
        
if flag == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import sys
n=int(input())
w=[input()]
check=True
for i in range (1,n):
    x = input()
    if x in w or x[0]!=w[i-1][len(w[i-1])-1]:
        check=False
    w.append(x)
if check:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
import sys
n=int(input())
w=[input()]
check=True
for i in range (1,n):
    x = input()
    if x in w or x[0]!=w[i-1][len(w[i-1])-1]:
        check=False
        w.append("0")
    else:
        w.append(x)
if check:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
N = int(input())
 
W = [[list(input())]]
 
def shiritori(N):
  for i in range(N):
    if any(W[i]):
      return "No"
    else:
    	if W[i-1][-1] == W[i][0]:
          return "Yes"
    	else:
          return "No"
    

        
print(shiritori(N))

Submission status: Runtime Error

Solution code:
i=int(input())
l=[]
c=True
for k in range(1,i+1):
  l.append(list(input())
if len(l)==len(set(l)):
  for k in range(0,i):
    if l[k][-1]!=l[k+1][0]:
       c=False
       break
else:
  c=False
if c==False:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
a, b = int(input())

d = a * b
if d % 2 == 0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
h,w = map(int,input().split())
a = []
for i in range(h):
	a.append(list(map(int,input().split())))
import copy
b = copy.deepcopy(a)

x = 0

for i in range(h):
	for j in range(w):
		if a[i][j]%2==1 and i!=h-1:
			a[i][j] = a[i][j]-1
			a[i+1][j] = a[i+1][j]+1
			x +=1
		elif a[i][j]%2==1 and j!=w-1:
			a[i][j] = a[i][j]-1
			a[i][j+1] = a[i][j+1]+1	
			x +=1

print(x)
for i in range(h):
	for j in range(w):
		if b[i][j]%2==1 and i!=h-1:
			b[i][j] = b[i][j]-1
			b[i+1][j] = b[i+1][j]+1
			print(i+1,j+1,i+2,j+1)

		elif b[i][j]%2==1 and j!=w-1:
			b[i][j] = b[i][j]-1
			b[i][j+1] = b[i][j+1]+1	
			print(i+1,j+1,i+1,j+2)

Submission status: Runtime Error

Solution code:
h,w = map(int,input().split())
a = []
for i in range(h):
	a.append(list(map(int,input().split())))
import copy
b = copy.deepcopy(a)

x = 0

for i in range(h):
	for j in range(w):
		if a[i][j]%2==1 and i!=h-1:
			a[i][j] = a[i][j]-1
			a[i+1][j] = a[i+1][j]+1
			x +=1
		elif a[i][j]%2==1 and j!=w-1:
			a[i][j] = a[i][j]-1
			a[i][j+1] = a[i][j+1]+1	
			x +=1

print(x)
print(b)
for i in range(h):
	for j in range(w):
		if b[i][j]%2==1 and i!=h-1:
			b[i][j] = b[i][j]-1
			b[i+1][j] = b[i+1][j]+1
			print(i+1,j+1,i+2,j+1)
		elif b[i][j]%2==1 and j!=w-1:
			b[i][j] = b[i][j]-1
			b[i][j+1] = b[i][j+1]+1	
			print(i+1,j+1,i+1,j+2)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if (A==2 or B==2:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
a, b = map(int, input().slice())
if a == 2 or b == 2:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if a % 2 = 0 or b%2=0:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
#abc110 C
N, X = map(int, input().split())
x = list(map(int, input().split()))
distance = [ abs(x[i]-X) for i in range(N)]


for d in range(min(distance),0,-1):
    flag = 1
    for i in range(N):
        if distance[i] % d != 0:
            flag = 0
    if flag == 1:
        print(d)
        break

Submission status: Runtime Error

Solution code:
N,A,B=map(int, input().split())
if N == 1:	
	print('Hallo World')
else:
	print(A+B)

Submission status: Runtime Error

Solution code:
N=int or N,A,B=map(int, input().split())
if N == 1:
  print('Hallo World')
else:
  print(A+B)

Submission status: Runtime Error

Solution code:
A, B=map(int, input(). split())
if A%2==1 and B%2==1:
	print(“Yes”)
else:
	print(“No”)

Submission status: Runtime Error

Solution code:
A, B=map(int, input(). split())
if A%2==1 and B%2==1:
	print(‘Yes’)
else:
	print(‘No’)

Submission status: Runtime Error

Solution code:
A, B=map(int, input(). split())
if (A*B)%2==1:
	print(“Yes”)
else:
	print(“No”)

Submission status: Runtime Error

Solution code:
A, B=map(int, input(). split())
if (A*B)%2==1:
	print(‘Yes’)
else:
	print(‘No’)

Submission status: Runtime Error

Solution code:
A, B=map(int, input(). split())
if(A*B%==1):
	print(‘Yes’)
else:
	print(‘No’)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
int C

if (A == 2) or (B == 2):
  print("No")
  
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
A, B = map(int, input())
int C

if A == 2 or B == 2:
  print("No")
  
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
int C

if A == 2 or B == 2:
  print("No")
  
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
int C

if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C == 3:
  print("Yes")

Submission status: Runtime Error

Solution code:
int i, t
A, B = int(input(i, t))
int C

if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C == 3:
  print("Yes")

Submission status: Runtime Error

Solution code:
A, B = int(input())
int C

if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Submission status: Runtime Error

Solution code:
A, B = [int(i) for i in input().split()]
int C

if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Submission status: Runtime Error

Solution code:
int C
A, B = [int(i) for i in input().split()]

if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Submission status: Runtime Error

Solution code:
int C
A = int(input())
B = int(input())
if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Submission status: Runtime Error

Solution code:
int A, B, C
A = input()
B = input()
if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Submission status: Runtime Error

Solution code:
int A, B, C
if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split())

if (a*b)%2 = 1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split())

if (a*b=1) or (a*b=3):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
#! /usr/bin/python
from operator import mul
print("Yes" if mul(map(int,input().split()))%2==1 else "No")

Submission status: Runtime Error

Solution code:
import math
from functools import reduce

N,X = (int(i) for i in input().split())
x=list(map(int,input().split()))

gcd_l = []
gcd_l.append(abs(X-x[0]))

for i in range(1,N):
    gcd_l.append(abs(x[i-1]-x[i]))

print(reduce(math.gcd,gcd_l))

Submission status: Runtime Error

Solution code:
import fractions
from functools import reduce
def func():
    n,x0 = map(int,input().split())
    x = [int(i) for i in input().split()]
    x.append(x0)
    x.sort()
    x.reverse()
    
    l = []
    before = 0
    before = None
    for xi in x:
        if before == None:
            before = xi
            continue
        l.append(xi-before)
        before = xi
    
    print(abs(reduce(fractions.gcd,l)))
func()

Submission status: Runtime Error

Solution code:
# -*- cording: utf-8 -*-

A,B = map(int, raw_input().split())
if A*B%2 == 0:
    print('NO')
else:
    print('YES')

Submission status: Runtime Error

Solution code:
import math
from functools import reduce

c, d = (int(i) for i in input().split())  
a = [int(i) for i in input().split()]
b = a.copy()

k = 0
for i in a:
    b[k] = abs(i - d)
    k += 1

m = min(b) 

lo = []

def gcd_list(numbers):
    return reduce(math.gcd, numbers)


                
print(gcd_list(b))

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
c=1
f=0
ans=0
while c<4 :
	ans=A*B*c
	c=c+1
	if ans%2==1:
		f=1
if f==1:
	print("Yes")
if f==0:
	print("No")

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
c=1
f=0
ans=0
while c<4 :
	ans=A*B*c
	c=c+1
	if ans%2==1:
		f=1
if f==1:
	print("Yes")
if f==0:
	print("NO")

Submission status: Runtime Error

Solution code:
n,x = map(int, input().split())
l = [ abs(i - x) for i in list(map(int, input().split()))]
l.sort(reverse=True)
if len(l) == 1:ans = l[0]
else:
  while len(l) != 1:
    l = list(set(l))
    l = [ l[i] - l[i+1] for i in range(len(l) - 1)]
  ans = l[0]
print(ans)

Submission status: Runtime Error

Solution code:
d = {}

i = int(input())

for m in range(i):
	word = input()
	d[m] = word
for n in range(1, i):
	h = n - 1
	a = d[h]
	b = d[n]
	if a[-1] == b[0]:
		continue
	else:
		print('No')
		exit()
for x in range (i - 1):
	for j in range (x + 1, i):
		if d[x] == d[j]:
			print('No')
			exit()
print('Yes')

Submission status: Runtime Error

Solution code:
N = int(input())

word = []
for i in range(N):
    word.append(input())

for i in range(N - 1):
    if word.count(word[i]) != 1:
        print('No')
        exit()

for i in range(1, N):
    if word[i][0] != word[i - 1][-1]:
        print('No')
        exit()

print('Yes')

Submission status: Runtime Error

Solution code:
N = int(input())

word = []

for i in range(N):
    word.append(input())

for i in range(N - 1):
    if word.count(word[i]) != 1:
        print('No')
        exit()


for i in range(1, N ):
    if word[i][0] != word[i - 1][-1]:
        print('No')
        exit()

print('Yes')

Submission status: Runtime Error

Solution code:
A,B = int(input().split())
if A*B*1 % 2 != 0 :
	print('Yes')
if A*B*2 % 2 != 0 :
	print('Yes')
if A*B*3 % 2 != 0 :
	print('Yes')
else :
	print('No')

Submission status: Runtime Error

Solution code:
A,B = int(input().split())
if (A*B*1) % 2 != 0 :
	print('Yes')
if (A*B*2) % 2 != 0 :
	print('Yes')
if (A*B*3) % 2 != 0 :
	print('Yes')
else :
	print('No')

Submission status: Runtime Error

Solution code:
A,B = int(input().split())
if (A*B*C) % 2 != 0 and 1=<C=<3;
	print(Yes)
else ;
	print(No)

Submission status: Runtime Error

Solution code:
A,B = int(input().split())
if (A*B*C) % 2 != 0 and 1=<C=<3;
	print('Yes')
else ;
	print('No')

Submission status: Runtime Error

Solution code:
A,B = int(input().split())
if (A*B*C) % 2 != 0 and 1=<C=<3:
	print("Yes")
else :
	print("No")

Submission status: Runtime Error

Solution code:
A,B = input().split()
if (A*B*C) % 2 != 0 and 1=<C=<3:
	print("Yes")
else :
	print("No")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

for c in range(1,4):
    answer = a * b * c
    mod = answer % 2
    if mod == 1:
        print('Yes')
        break
    print('No')
    break

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

a = int(input())
b = int(input())

for c in range(1,4):
    answer = a * b * c
    mod = answer % 2
    if mod == 1:
        print('Yes')
        break
    print('No')
    break

Submission status: Runtime Error

Solution code:
a = input()                                                                                             
b = input()

a = int(a)
b = int(b)


for c in range(1,4):
    answer = a * b * c
    mod = answer % 2
    if mod == 1:
        print('Yes')
        break
    print('No')
    break

Submission status: Runtime Error

Solution code:
N = int(input())
ls = []
flag = True
for n in range(0, N):
  char = raw_input()
  if n == 0:
    ls.append(char)
  else:
    if char in ls:
      flag = False
    else:
      ls.append(char)
if flag == True:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
ls = []
flag = True
for n in range(0, N):
  char = input()
  if n == 0:
    ls.append(char)
  else:
    if char in ls:
      flag = False
    else:
      ls.append(char)
if flag == True:
  print('Yes')

Submission status: Runtime Error

Solution code:
N = int(input())
list = []
flag = True
for n in range(0, N):
  char = input()
  if n == 0:
    list.append(char)
  else:
    if char in list:
      flag = False
    else:
      list.append(char)
if flag == True:
  print('Yes')

Submission status: Runtime Error

Solution code:
N = int(input())
list = []
flag = True
for n in range(0, N):
  input = input()
  if n == 0:
    list.append(input)
  else:
    if input in list:
      flag = False
    else:
      list.append(input)
if flag == True:
  print('Yes')

Submission status: Runtime Error

Solution code:
N = int(input())
list = []
flag = true
for n in range(0, N):
  input = input()
  if n == 0:
    list.append(input)
  else:
    if input in list:
      flag = false
    else:
      list.append(input)
if flag == true:
  print('Yes')

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
for n in range(1, 4):
  if a*b*c % 2 == 1:
    print('Yes')
    break
  else:
    if n == 3:
      print('No')

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
for n in range(1, 4):
  if a*b*c % 2 == 1:
    return 'Yes'
return 'No'