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())
a = list(map(int, input().split()))
if n == 1:
    print(abs(x-a[0]))
    exit()
a.sort()
else:
    box = [a[i+1]-a[i] for i in range(n-1)]
    b = min(box)
    for i in range(1,b+1):
        for j in range(n-1):
            if box[j]%i:
                break
            if j == n-2:
                ans = i
    d = abs(x-a[0])
    if ans <= d:
        for i in range(1,ans+1):
            if d%i:
                continue
            else:
                temp = i
        print(temp)
    else:
        for i in range(1,d+1):
            if ans%i:
                continue
            else:
                temp = i
        print(temp)

Submission status: Runtime Error

Solution code:
num = input().split()

if num[0] * num[1] % 2 == 0 :
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
def gcd(x, y):
    r = modlog(x, y)
    while r != 0:
        x = y
        y = r
        r = modlog(x, y)
    return y

def modlog(x, y):
    r = x % y
    return r

if __name__ == '__main__' :
    N,X = map(int, input().split())
    x = list(map(int, input().split()))

    dist_list = [abs(d-X) for d in x]

    if len(dist_list) == 1:
        print (dist_list[0])
        exit()
        
    alpha = gcd(dist_list[0],dist_list[1])
    for d in dist_list:
        alpha = gcd(alpha,d)

    print(alpha)

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    W = []
    for n in range(N):
        W.append(input())
    for i, w in enumerate(W):
        if i==0:
            prev_w = w
            continue
        for wn in W[:i]:
            if w == wn:
                print('No')
                return 
        if prev_w[-1] != w[0]:
            print('No')
            return
        prev_w = w
    print('Yes')
    return

main()

Submission status: Runtime Error

Solution code:
# -*- coding: UTF-8 -*-
# q1

import sys

args = sys.argv

A = 0
B = 0
C = 1

A = int(args[1])
B = int(args[2])

temp = {}

while C <= 3:
    temp[C] = (A * B * C) % 2
    C = C + 1


C = 1

while C <= 3:
    if temp[C] == 0:
        answer = "No"
    else:
        answer = "yes"

    C = C + 1

print(answer)

Submission status: Runtime Error

Solution code:
def gcd(x, y):
    r = modlog(x, y)
    while r != 0:
        x = y
        y = r
        r = modlog(x, y)
    return y

def modlog(x, y):
    r = x % y
    return r

if __name__ == '__main__' :
    N,X = map(int, input().split())
    x = list(map(int, input().split()))

    dist_list = [abs(d-X) for d in x]

    alpha = gcd(dist_list[0],dist_list[1])
    for d in dist_list:
        alpha = gcd(alpha,d)

    print(alpha)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B = map(int, raw_input().split())
x = A * B
if x % 2 == 0:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    W = []
    for n in range(N):
        W.append(input())
    for i, w in enumerate(W):
        prev_w = w
        if i==0:
            continue
        for wn in W[:i]:
            if w == wn:
                print('No')
                return 
        if prev_w[-1] != w[0]:
            print('No')
            return
    print('Yes')
    return

main()

Submission status: Runtime Error

Solution code:
from fraction import gcd

if __name__ == '__main__' :
    N,X = map(int, input().split())
    x = list(map(int, input().split()))

    dist_list = [abs(d-X) for d in x]

    alpha = gcd(dist_list[0],dist_list[1])
    for d in dist_list:
        alpha = gcd(alpha,d)

    print(alpha)

Submission status: Runtime Error

Solution code:
a = input().split()
a = [int(i) for i in a]

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

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    W = []
    for n in range(N):
        W.append(input())
    for i, w in enumerate(W):
        prev_w = w
        if i==0:
            continue
        for wn in W[:i-1]:
            if w == wn:
                print('No')
                return 
        if prev_w[-1] != w[0]:
            print('No')
            return
    print('Yes')
    return

main()

Submission status: Runtime Error

Solution code:
import sys
l = map(int, raw_input().split())
if (l[0] * l[1]) % 2 == 0:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
from math import gcd
import functools

if __name__ == '__main__' :
    N,X = map(int, input().split())
    x = list(map(int, input().split()))

    dist_list = [abs(d-X) for d in x]

    print(functools.reduce(gcd, dist_list))

Submission status: Runtime Error

Solution code:
'''input
3 5
1 2 3
'''
from fractions import gcd
n,x = map(int,raw_input().split())
arr = map(int,raw_input().split())
arr.append(x)
arr.sort()
diff = []
for i in range(1,n):
	diff.append(arr[i]-arr[i-1])
gc = diff[0]
for i in range(1,len(diff)):
	gc = gcd(gc,diff[i])
print gc

Submission status: Runtime Error

Solution code:
A, B = map(int, raw_input().split(' '))

if (A * B) % 2 == 0:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

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

if (A * B) % 2 == 0:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if (A * B) % 2 == 0 :
  print('No')
else :
  print('Yes')

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())
if l[0] * l[1] % 2 == 1
 print('Yes')
else
 print('No')

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())
if (l[0]*l[1])%2==1
 print('Yes')
else
 print('No')

Submission status: Runtime Error

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

if (A * B) % 2 == 0 :
  print('no')
else :
  print('yes')

Submission status: Runtime Error

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

if (A * B) % 2 == 0 :
  print('no')
else :
  print('yes')

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:
print("Yes" if list(filter(lambda x:x%2==0,map(int, input().split()))) "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
for i in range (1,4):
    if A*B*i==3:
        print("Yes")
        sys.exit()
print("No")

Submission status: Runtime Error

Solution code:
import math
num=input()
a,b=int(num.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*B*1%2==1 or A*B*2%2==1 or A*B*3%2==1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

if X % == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

if a!=2 and b!=2:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
num=int(input())
a,b=num.split()

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

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:
import math
num=int(input())
a,b=num.split()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if a % 2 == 1 or b % 2 == 1:
  print('No')
  else:
    print('Yes')

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if (a*b)%2!==0:
  print("Yes")
elif (a*b*3)%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
num=int(input())
a,b=num.split()

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

Submission status: Runtime Error

Solution code:
a,b=int(input())
res='Yes'
if a*b ==0: res='No'
if a*b >3: res='No'
print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print "No" if a % 2 == 0 or b % 2 == 0 else "Yes"

Submission status: Runtime Error

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

if a % 2 == 1 or b % 2 == 1:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <vector>
#include <utility>
#include <numeric>
#include <functional>
#include <stdio.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <deque>
#include <queue>
#include <map>

#define rep(i, m, n) for (int (i)(m); (i)<(n); ++(i))
#define repr(i, m, n) for (int (i)(m - 1); (i)>=(n); --(i))
#define repv(i, v) for (unsigned (i)(0); (i)<(v.size()); ++(i))
#define all(v) (v).begin(), (v).end()
#define sortv(v) sort(all(v))
#define sortgi(v) sort(all(v), greater<int>())
#define sortgd(v) sort(all(v), greater<double>())
#define sortgll(v) sort(all(v), greater<ll>())
#define debug(x) cerr << #x << ": " << x << '\n'

using namespace std;
using pii = pair<int, int>;
using pss = pair<string, string>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vd = vector<double>;
using vvd = vector<vd>;
using vs = vector<string>;
using ll = long long;
using pllll = pair<ll, ll>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
using vpii = vector<pii>;
using pqi = priority_queue<int>;
using pqd = priority_queue<double>;
using pqll = priority_queue<ll>;
using pqvi = priority_queue<vi>;
using pqvll = priority_queue<vll>;

int main() {
	int a, b;
	cin >> a >> b;
	if (a % 2 == 0 || b % 2 == 0) {
		cout << "No" << endl;
	}
	else {
		cout << "Yes" << endl;
	}
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if a%2==1 and b%2==1:
    print('Yes')
else:
    print('No')