Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
    if X == int(X):
        if 1<= X <= 179:
            K = 360/X
            if int(K) < K :
                K = int(int(K) - 1)
                print(K)
            else:
                K = int(K)
                print(K)

Fixed submission:
import math

if __name__ == "__main__":
    deg = int(input())
    print(360//math.gcd(deg, 360))
Buggy python submission (verdict: Runtime Error):
x,y= map(int,input().split())
crane= 2
turtle= 4
ans="No"
for i in range(x+1):
    b=x-i
    if cranei + turtleb == y:
        ans = "Yes"
print(ans)

Fixed submission:
x,y= map(int,input().split())
crane= 2
turtle= 4
ans="No"
for i in range(x+1):
    b=x-i
    if crane*i + turtle*b == y:
        ans = "Yes"
print(ans)

# the for loop is to check for any combinations of numbers of cranes and turtles in which the statement is correct.
Buggy python submission (verdict: Runtime Error):
#input x,n and p as intergers. p acts as an array
x,n=int(input()).split()
p=int([]).split()
length=len(p)

#define the closest number
def closestnum(p,length):
    return p[min(range(length))]
#print when x is not it p
for x not in p:
    print(round(closestnum(p,length)))
    
    


Fixed submission:
import math

if __name__ == "__main__":
    x, n = map(int, input().split())
    a = set(map(int, input().split()))
    p = q = x
    while True:
        if p not in a and q not in a:
            print(min(p, q))
            quit(0)
        if p not in a:
            print(p)
            quit(0)
        elif q not in a:
            print(q)
            quit(0)
        else:
            p -= 1
            q += 1
Buggy python submission (verdict: Time Limit Exceeded):
#first take the number of the input
#declare list A then input all the list value
#multiply all the value using operation
#if exceed 10^18 print -1
#if not just print the answer

N=int(input()) #O(1)
A=[]
A=list(map(int,input().split())) #O(n)
answer=1 #O(1)
z=0 #O(1)

while z<N: #O(n)
    answer=answer*A[z] #O(1)
    z=z+1 #O(n)

total=answer    
if total > 10**18: #O(1)
    print("-1") #O(1)
elif total <= 10**18: #O(1)
    print(total) #O(1)




Fixed submission:
n = int(input())
b = list( map (int , input().split() ) )
b.sort()
ans = 1
for i in range(n):
    ans*=b[i]
    if ans>10**18:
      print(-1)
      exit()

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
tem = 1
if a == 0: #do nothing if 0
    a=1
else:
    b=input().split(" ")
    for i in range(a): #calculate until'a' number only
        tem = tem * int(b[i]) #multiply the list
    if tem> 10**18: #check exceed
        tem = -1
    print(tem)

Fixed submission:
n = int(input())
b = list( map (int , input().split() ) )
b.sort()
ans = 1
for i in range(n):
    ans*=b[i]
    if ans>10**18:
      print(-1)
      exit()

print(ans)

Buggy python submission (verdict: Runtime Error):
a=int(input())
tem = 1

if a != 0:
    b=input().split(" ")
    for i in range(a):
        tem = tem * int(b[i])
    if len(tem)> 10**18:
        tem = -1
print(tem)

Fixed submission:
n = int(input())
b = list( map (int , input().split() ) )
b.sort()
ans = 1
for i in range(n):
    ans*=b[i]
    if ans>10**18:
      print(-1)
      exit()

print(ans)
Buggy python submission (verdict: Runtime Error):
x, y = [int(x) for x in input().split()]

for tareas in range(y):

    c = int(input())

    x-=c
print(x)



Fixed submission:
x=input()
z=input()
y=[]
a=[]
y = x.split()
a = z.split()
a = list(map(int,a))
y = list(map(int,y))
if (sum(a)>y[0]):
    print(-1)
else:
    print(y[0]-sum(a))
Buggy python submission (verdict: Runtime Error):
temp=list(map(int,input().rstrip().split()))
n=temp[0]
S=temp[1]
summ=0
count=0
while summ<S :
    if (S-summ)>=n :
        summ+=n

        count+=1
    else :
        count+=1
        break
print(count)

Fixed submission:
n=int(input())
a=set()
while n!=0 :
    rem=n%10
    a.add(rem)
    n/=10
if 7 in a :
    print("Yes")
    
else :
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
def mdc(a, b):
    if b == 0: return a
    return mdc(b, a%b)

def main():
    resp = 0
    k = int(input())
    for i in range(1, k + 1):
        for j in range(1, k + 1):
            for w in range(1, k + 1):
                resp += mdc(mdc(i, j), w)

    print(resp)
                
    
main()

Fixed submission:
# In peace, in love, in war, everything is the same

import math

ar = [[0]*201 for i in range(201)]
for i in range(1, 201, 1):
	for j in range(1, 201, 1):
		ar[i][j] = math.gcd(i, j)
		
n, ans = int(input()), 0
for i in range(1, n+1, 1):
	for j in range(1, n+1, 1):
		for k in range(1, n+1, 1):
			ans += ar[ar[i][j]][k]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
X, Y, A, B, C = input().split(" ")
Xa = input().split(" ")
Ya = input().split(" ")
Notra = input().split(" ")
def toint(a):
	for i in range(len(a)):
		a[i]=int(a[i])
toint(Xa)
toint(Ya)
toint(Notra)
Notrmax = 0
Notra.sort(reverse=True)
Xa.sort(reverse=True)
Ya.sort(reverse=True)
Xa = Xa[0:int(X)]
Ya = Ya[0:int(Y)]
def change():
	answer = 0
	while True:
		Notra.sort(reverse=True)
		Xa.sort()
		Ya.sort()
		if Xa[0] > Ya[0]:
			try:
				if Ya[0] < Notra[0]:
					Ya[0] = Notra[0]
					Notra.remove(Notra[0])
				else:
					break;
			except:
				break;
		elif Xa[0] < Ya[0]:
			try:
				if Xa[0] < Notra[0]:
					Xa[0] = Notra[0]
					Notra.remove(Notra[0])
				else:
					break;
			except:
				break;
		elif Xa[0] == Ya[0]:
			try:
				if Xa[0] < Notra[0]:
					Xa[0] = Notra[0]
					Notra.remove(Notra[0])
				else:
					break;
			except:
				break;
	for i in Xa:
		answer += i
	for i in Ya:
		answer += i
	print(answer)
change()

Fixed submission:
x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))
# print(p,q)
p = sorted(p, reverse=True)
q = sorted(q, reverse=True)
r = sorted(r, reverse=True)
p = [int(1e10)]+p[:x]
q = [int(1e10)]+q[:y]
k = 0
i, j = x, y
# print(p, q)
while 1:
   if k >= c:
      break
   if min(p[i], q[j]) >= r[k] :
      break
   if p[i] < q[j]:
      p[i] = r[k]
      i -= 1
   else :
      q[j] = r[k]
      j -=1
   k += 1
print(sum(p[1:])+sum(q[1:]))
Buggy python submission (verdict: Runtime Error):
import math
def f(x):
    return math.factorial(x)
arr=list(map(int,input().split()))
n=arr[0]
m=arr[1]
cnt=0
cnt+=int(f(n)/(2*f(n-2)))
if m>1:cnt+=int(f(m)/(2*f(m-2)))
print(int(cnt))

Fixed submission:
a = list(map(int, input().rstrip().split()))
out=0
for i in a:
    if i > 1:
        out += i*(i-1)//2
print(out)
Buggy python submission (verdict: Runtime Error):
S=input()
size=len(S)
def palin(S,size):
    for i  in range (size//2):
        if S[i]!=S[-1-i]:
            return False
    return True
if palin(S,size) == True:
    L=S[:size//2]
    R=S[size//2+2]
    if palin(L,size//2) & palin(L,size//2):
        print('Yes')
    else:
        print('No')
else:
    print('No')


Fixed submission:
S=input()
size=len(S)
def palin(S,size):
    for i  in range (size//2):
        if S[i]!=S[-1-i]:
            return False
    return True
if palin(S,size) == True:
    L=S[:size//2]
    R=S[size//2+2:]
    if palin(L,size//2) & palin(L,size//2):
        print('Yes')
    else:
        print('No')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
#include<iostream>

using namespace std;


main()
{
    int n;
    cin>>n;
    int l=n/3;
    n-=l;
    int w=n/2;
    int h = n-w;
    cout<<l*w*h;
}



Fixed submission:
#HIManshu
H = int(input())
E = H / 3
print(E ** 3)

Buggy python submission (verdict: Runtime Error):
def minimumSquare(a, b): 
  
    result = 0
    rem = 0
 
    if (a < b): 
        a, b = b, a  
     while (b > 0): 
      
        # Update result 
        result += int(a / b)  
  
        rem = int(a % b)  
        a = b  
        b = rem  
  
    return result  
n = 13
m = 29
  
print(minimumSquare(n, m)) 

Fixed submission:
#HIManshu
H = int(input())
E = H / 3
print(E ** 3)
Buggy python submission (verdict: Runtime Error):
h=int(input())
w=int(input())

print(ceil(h/2.0)*ceil(w/2.0)+floor(h/2.0)*floor(w/2.0))

Fixed submission:
import math
r,c = input().split()
r = int(r)
c = int(c)
if(r==1 or c==1):
    print(1)
else:    
    ans = r*c/2
    if r%2==1 and c%2==1:
        print(math.floor(ans)+1)
    else:
        print(math.floor(ans))
Buggy python submission (verdict: Runtime Error):
M = int(M)
N = int(N)
ans = ['0' for i in range (N)]
fl = True

for i in range (M) :
    s , c = input().split()
    s = int(s) - 1
    if (s == 0 and c == '0') :
        fl = False
    if (ans[s] != '0') :
        if (ans[s] != c) :
            fl = False
    else :
        ans[s] = c

res = ''

if (ans[0] == '0' and N != 1) :
    ans[0] = '1'

for i in ans :
    res += i

print (res if fl else -1)


Fixed submission:
n, m = list (map (int, input ().split ()))
d = [-1 for i in range (n + 1)]
flg = True

for i in range (m) :
    s, c = list (map (int, input ().split ()))
    if (flg) :
        if (d[s] != -1 and d[s] != c) :
            flg = False
            continue
        d[s] = c

if (d[1] == 0 and n > 1) :
    flg = False

if (flg and n > 1) :
    for i in range (1, n + 1) :
        if (d[i] == -1) :
            if (i == 1) :
                d[i] = 1
            else :
                d[i] = 0

if (n == 1 and d[1] == -1) :
    d[1] = 0

print (''.join (list (map (str, d[1:]))) if flg else "-1")

Buggy python submission (verdict: Runtime Error):
n,m = input().split(" ")
n = int(n)
m = int(m)
ans = -1
ans1 = ['0']*n
for i in range(m):
    si, ci = input().split(" ")
    si=int(si)
    if(ans1[si-1]=='0'):
        ans1[si-1]=ci
    elif(ans1[si-1]>ci):
        ans1[si-1]=ci
        
if(ans1[0]!='0'):
    ans = int(('').join(ans1))
elif(int(('').join(ans1))==0)
    ans=0
print(ans)    

Fixed submission:
n, m = list (map (int, input ().split ()))
d = [-1 for i in range (n + 1)]
flg = True

for i in range (m) :
    s, c = list (map (int, input ().split ()))
    if (flg) :
        if (d[s] != -1 and d[s] != c) :
            flg = False
            continue
        d[s] = c

if (d[1] == 0 and n > 1) :
    flg = False

if (flg and n > 1) :
    for i in range (1, n + 1) :
        if (d[i] == -1) :
            if (i == 1) :
                d[i] = 1
            else :
                d[i] = 0

if (n == 1 and d[1] == -1) :
    d[1] = 0

print (''.join (list (map (str, d[1:]))) if flg else "-1")
Buggy python submission (verdict: Runtime Error):
N = int(input())
R = int(input())
if 0 <= R <= 4111:
    if 10 <= N <= 100:
        print(R)
    else:
        K = 100 * (10 - N)
        M = R + K
        print(M)

Fixed submission:
NR= input().split()
N= int (NR[0])
R= int (NR[1])
if (N >= 10):
    print(R)
else:
    print (R+100*(10-N))

Buggy python submission (verdict: Runtime Error):
N = int(input('N:'))
R = int(input('R:'))
while int(N) == N and int(R) == R:
    if 1 <= N <= 100 and 0 <= R <= 4111:
        if N > 10:
            print(R)
        else:
            K = 100 * (10 - N)
            print(R + K)
    break

Fixed submission:
NR= input().split()
N= int (NR[0])
R= int (NR[1])
if (N >= 10):
    print(R)
else:
    print (R+100*(10-N))
Buggy python submission (verdict: Runtime Error):
N,K=input().split()
n,k=int(N),int(K)

for i in range(0,1000000):
  
    if n-k**i>1:
        print(i)
        break
    if n=k**i-1:
        print(i-1)
        break

Fixed submission:
n, k = list (map (int, input ().split ()))

cnt = 0
while (n) :
    cnt += 1
    n //= k

print (cnt)
Buggy python submission (verdict: Runtime Error):
import math


def point_stamina(p):
    stamina = 0
    for x in persons_coordinates:
        stamina += (x - p) ** 2
    return stamina


n = int(input())
persons_coordinates = list(map(int, input().split()))
max_coordinate = max(persons_coordinates)
min_coordinate = min(persons_coordinates)
min_stamina = math.inf

for p in range(min_coordinate, max_coordinate + 1):
    stamina = point_stamina(p)
    if min_stamina >= stamina:
        min_stamina = stamina

print(min_stamina)

Fixed submission:
n = map(int,input().split())
a = list(map(int,input().split()))
q = []
mi,ma = min(a),max(a)
for i in range(mi,ma+1):
    x = 0
    for j in a:
        x+=(j-i)**2
    q.append(x)
print(min(q))
Buggy python submission (verdict: Runtime Error):
#include<stdio.h>
void main( )
{
int e,f,g;
scanf("%d%d%d", &e, &f, &g);
int count = 0;
if( e==f && f!=g)
count=1;
if( f==g && g!=f)
count=1;
if( g==e && e!=f)
count=1;

if(count==1)
{
 printf("Yes");
}
else
{
printf("No");
}
}

Fixed submission:
n = list(map(int,input().strip().split()))

c1 = n.count(n[0])
c2 = n.count(n[1])
if c1==2 or c2 == 2:
  print('Yes')
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
A,B,C=input().split()
a=int(A)
b=int(B)
c=int(C)
if a==b or b==c or a==c:
    if not(a==b and b==c):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Fixed submission:
n = list(map(int,input().strip().split()))

c1 = n.count(n[0])
c2 = n.count(n[1])
if c1==2 or c2 == 2:
  print('Yes')
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
#include <stdio.h>

int main()
{
    int a,b,c;
    scanf("%d %d %d", &a, &b, &c);
    if((a==b && a != c) || (a==c && a != b) || (c==b && a != c))
    printf("Yes");
    else
    printf("No");

    return 0;
}

Fixed submission:
n = list(map(int,input().strip().split()))

c1 = n.count(n[0])
c2 = n.count(n[1])
if c1==2 or c2 == 2:
  print('Yes')
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a==b or b==c or a==c:
    if not(a==b and b==c):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Fixed submission:
n = list(map(int,input().strip().split()))

c1 = n.count(n[0])
c2 = n.count(n[1])
if c1==2 or c2 == 2:
  print('Yes')
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
def poor(a,b,c):
    if (a==b and a!=c) or (b==c and b!=a) or (a==c&&a!=b):
        print("Yes")
    else:
        print("No")
        
A,B,C = input().split()
a = A
b = B
c = C
d = poor(a,b,c)
print(d)

Fixed submission:
n = list(map(int,input().strip().split()))

c1 = n.count(n[0])
c2 = n.count(n[1])
if c1==2 or c2 == 2:
  print('Yes')
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())

if a==b or b==c or a==c:
    print("Yes")
else:
    print("No")


Fixed submission:
n = list(map(int,input().strip().split()))

c1 = n.count(n[0])
c2 = n.count(n[1])
if c1==2 or c2 == 2:
  print('Yes')
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=[]
ha={}

for i in range (n):
    s.append(input())
    if (s[i] not in ha.keys()):
        ha[s[i]]=1
    else:
        ha[s[i]]=ha[s[i]]+1

ans=sorted(ha.items(),key=lambda x:x[i], reverse=True)

k=ans[0][1]
i=0
while (i< len(ans) and ans[i][1]==k):
    i+=1

ans=ans[:i]
ans.sort()
for ss in ans:
    print(ss[0])


Fixed submission:
N=input()
n=int(N)

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

ha = {}

for i in p :
    if (i not in ha.keys()) :
        ha[i] = 1
    else :
        ha[i] += 1

res = ha.items()

res = sorted(ha.items(), key = lambda x : x[1] , reverse = True )

i = 1
k = res[0][1]

while (i < len(res) and res[i][1] == k) :
    i += 1

res = res[ : i]

res.sort()
for i in res :
    print (i[0])

Buggy python submission (verdict: Runtime Error):
import math


n = int(input())
candidates = {}


for _ in range(n):
    inp = input()
    if inp in candidates:
        candidates[inp] += 1
    else:
        candidates[inp] = 1


max_votes = -math.inf
for candidate, votes in candidates.items():
    if votes >= max_votes:
        max_votes = votes

winners = []
for candidate, votes in candidates.items():
    if votes == max_votes:
        winners.append(candidate)

winners.sort()

for winner in winners:
    print(winner)

Fixed submission:
N=input()
n=int(N)

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

ha = {}

for i in p :
    if (i not in ha.keys()) :
        ha[i] = 1
    else :
        ha[i] += 1

res = ha.items()

res = sorted(ha.items(), key = lambda x : x[1] , reverse = True )

i = 1
k = res[0][1]

while (i < len(res) and res[i][1] == k) :
    i += 1

res = res[ : i]

res.sort()
for i in res :
    print (i[0])
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.buffer.readline
 
def main():
    t,b,c,d = map(int,input().split())
    MOD = 10**9+7
    N = c+d+5
    fac = [0 for _ in range(N+1)]
    fac[0],fac[1] = 1,1
 
    for i in range(2,N+1):
        fac[i] = (fac[i-1]*i)%MOD
        
    def comb(x,y):
        return (fac[x+y]*pow(fac[x],MOD-2,MOD)*pow(fac[y],MOD-2,MOD))%MOD
 
    print((comb(c+1,d+1)-comb(c+1,b)-comb(d+1,t)+comb(t,b))%MOD)
    
if _name_ == "_main_":
    main()
#print the result
#calling the main function

Fixed submission:
import sys
input = sys.stdin.buffer.readline
 
def main():
    a,b,p,d = map(int,input().split())
    MOD = 10**9+7
    N = p+d+5
    fac = [0 for _ in range(N+1)]
    fac[0],fac[1] = 1,1
 
    for i in range(2,N+1):
        fac[i] = (fac[i-1]*i)%MOD
        
    def comb(x,y):
        return (fac[x+y]*pow(fac[x],MOD-2,MOD)*pow(fac[y],MOD-2,MOD))%MOD
 
    print((comb(p+1,d+1)-comb(p+1,b)-comb(d+1,a)+comb(a,b))%MOD)
    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.buffer.readline
 
def main():
    t,b,c,d = map(int,input().split())
    MOD = 10**9+7
    N = c+d+5
    fac = [0 for _ in range(N+1)]
    fac[0],fac[1] = 1,1
 
    for i in range(2,N+1):
        fac[i] = (fac[i-1]*i)%MOD
        
    def comb(x,y):
        return (fac[x+y]*pow(fac[x],MOD-2,MOD)*pow(fac[y],MOD-2,MOD))%MOD
 
    print((comb(c+1,d+1)-comb(c+1,b)-comb(d+1,t)+comb(t,b))%MOD)
    
if _name_ == "_main_":
    main()
#print the result

Fixed submission:
import sys
input = sys.stdin.buffer.readline
 
def main():
    a,b,p,d = map(int,input().split())
    MOD = 10**9+7
    N = p+d+5
    fac = [0 for _ in range(N+1)]
    fac[0],fac[1] = 1,1
 
    for i in range(2,N+1):
        fac[i] = (fac[i-1]*i)%MOD
        
    def comb(x,y):
        return (fac[x+y]*pow(fac[x],MOD-2,MOD)*pow(fac[y],MOD-2,MOD))%MOD
 
    print((comb(p+1,d+1)-comb(p+1,b)-comb(d+1,a)+comb(a,b))%MOD)
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
H = int(input())
K = int(input())
cnt=0
while(H>0):
  H=H-K
  cnt=cnt+1

print(cnt)

Fixed submission:
import sys

for line in sys.stdin:
    l= line.split()
    H=int(l[0])
    A=int(l[1])
    i = 0
    while(H>0):
        H-=A
        i+=1
    print(i)
Buggy python submission (verdict: Runtime Error):
special_moves = input().split(" ")

_, special_moves = int(inputs[0]), int(inputs[1])

health= input().split(" ")
health= [int(h) for h in health]
health.sort(reverse=True)
print(sum(health[special_moves:]))

Fixed submission:
from sys import stdin

def main():
    n,m = map(int,stdin.readline().split())
    l = list(map(int,stdin.readline().split()))
    l.sort()
    aco = 0
    for i in range(n-m):
        aco+= l[i]
    print(aco)
        
main()
Buggy python submission (verdict: Runtime Error):
n=int(input())
m=int(input())
if(n==m):
    print("Yes\n")
else:
    print("No\n")

Fixed submission:
from sys import stdin

def main():
    n,m = map(int,stdin.readline().split())
    if(n==m):
        print("Yes")
    else:
        print("No")

main()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
cnt = 0
b = []
for i in range (n):
    b = a[:i+1]
    if a[i] == min(b):
        cnt += 1
print (cnt)

Fixed submission:
from sys import stdin

def main():
    n = int(stdin.readline().strip())
    l = list(map(int,stdin.readline().split()))
    ar = [-1 for _ in range(n)]
    ar[0] = l[0]
    ans = 1
    for i in range(1,n):
        if(l[i] <= ar[i-1]):
            ans+=1
            ar[i] = l[i]
        else:
            ar[i] = ar[i-1]
    print(ans)
        
main()

Buggy python submission (verdict: Runtime Error):
a= int(input())
b= input().split()
compare=b[0]
c=0

for i in range(a):
    if (compare>=int(b[i])):
        compare=int(b[i])
        c=c+1
        
print(c)



Fixed submission:
from sys import stdin

def main():
    n = int(stdin.readline().strip())
    l = list(map(int,stdin.readline().split()))
    ar = [-1 for _ in range(n)]
    ar[0] = l[0]
    ans = 1
    for i in range(1,n):
        if(l[i] <= ar[i-1]):
            ans+=1
            ar[i] = l[i]
        else:
            ar[i] = ar[i-1]
    print(ans)
        
main()
Buggy python submission (verdict: Runtime Error):

//HOLA MIM MI KLSJLFKJSLJFJSLDFSKJDFLK
input();s = input();print(s.count("ABC"))

Fixed submission:
x=int(input())
arr=input()
print(arr.count('ABC'))
Buggy python submission (verdict: Runtime Error):
def stringconcant(S,T):
    a = S
    b = T
    c = a+b
    return c

S= input()
T= input()
a = stringconcant(S,T)
print(a)

Fixed submission:
str1 , str2 = input().split(" ")
str3 = str2+str1
print(str3)

Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
print(T+S)
#
#
#################################

Fixed submission:
str1 , str2 = input().split(" ")
str3 = str2+str1
print(str3)

Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    S = input()
    T = input()
    print(T+S)

Fixed submission:
str1 , str2 = input().split(" ")
str3 = str2+str1
print(str3)
Buggy python submission (verdict: Runtime Error):
r = input()

print int(r*r)

































































Fixed submission:
print(int(input())**2)














###################################################################

Buggy python submission (verdict: Runtime Error):
print(int(r*r))















































Fixed submission:
print(int(input())**2)














###################################################################
Buggy python submission (verdict: Time Limit Exceeded):
x, y = map(int, input().split())

m = int(1e9)+7

def fp(a, p):
	if p==0:
		return 1
	h = fp(a, p//2)
	h *= h
	h %= m
	if p % 2:
		h = h * a % m
	return h

if 2*x - y < 0 or (2*x - y) % 3 != 0 or 2*y-x < 0 or (2*y - x)%3!=0:
	print(0)
else:
	b = (2*x-y)//3
	a = (2*y-x)//3

	if a > b:
		tmp = a
		a = b
		b = tmp

	ans = 1
	for i in range(b+1, a+b+1):
		ans *= i
		ans %= m

	for i in range(2, a+1):
		ans *= fp(i, m-2)
		ans %= m
	print(ans)
	

Fixed submission:
MOD = int(1e9+7)

def power(b, e):
    res = 1
    while e > 0:
        if e % 2 == 1:
            res = res * b % MOD
        b = b * b % MOD
        e //= 2
    return res

def mod_inverse(n):
    return power(n, MOD-2)

def mul(x, y):
    return (x % MOD) * (y % MOD) % MOD
def multiply(x, y, z):
    return mul(mul(x, y), z)

def nCr(n, r):
    if r == 0:
        return 1
    fac = [1] * (n+1)
    for i in range(1, n+1):
        fac[i] = fac[i-1] * i % MOD
    return multiply(fac[n], mod_inverse(fac[r]), mod_inverse(fac[n-r]))

x, y = map(int, input().split())
n = (2*x-y) // 3
m = (2*y-x) // 3
if min(n, m) < 0 or (x+y)%3 != 0:
    print(0)
    exit()
print(nCr(n+m, m))