qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N, K = map(int, input().split())
V = list(map(int, input().split()))

value = 0

for cd in range(K):
    ab = min(N, K-cd)
    for left_ab in range(ab+1):
        right_ab = ab - left_ab
        pick = V[:left_ab] + V[-right_ab:]
        pick.sort()
        neg = 0
        while True:
            if pick[neg]<0:
                neg+=1
                continue
            else:
                break
        v = sum(pick[min(neg,K):])
        value = max(value,v)
        
print(value)

Fixed code:
N, K = map(int, input().split())
V = list(map(int, input().split()))
value = 0

for cd in range(K):
    ab = min(N, K-cd)
    for left_ab in range(ab+1):
        right_ab = ab - left_ab
        if right_ab > 0:
            pick = V[:left_ab] + V[-right_ab:]
        else:
            pick = V[:left_ab]
        pick.sort()
        neg = 0
        while neg < len(pick):
            if pick[neg]<0:
                neg+=1
                continue
            else:
                break
        v = sum(pick[min(neg,cd):])
        value = max(value,v)
        
print(value)
Buggy code:
a,k=map(int,input().split())
L=list(map(int,input().split()))
ans=0

for i in range(min(k,n)+1):
  for j in range(min(k,n)-i+1):
    S=[0]+L[:i]+L[a-j:]
    S.sort()
    x=0
    while x < k-(j+i):
      if S[x]>=0:
        break
      x+=1
    ans=max(ans,sum(S)-sum(S[:x]))
    
print(ans)


Fixed code:
a,k=map(int,input().split())
L=list(map(int,input().split()))
ans=0

for i in range(min(k,a)+1):
  for j in range(min(k,a)-i+1):
    S=[0]+L[:i]+L[a-j:]
    S.sort()
    x=0
    while x < k-(j+i):
      if S[x]>=0:
        break
      x+=1
    ans=max(ans,sum(S)-sum(S[:x]))
    
print(ans)
Buggy code:
N, K = map(int, input().split())
V = list(map(int, input().split()))
Vi = [i+1 for i in range(len(V))]
V.extend(V)
Vi.extend(Vi)
ans = 0
for k in range(1, min(K+1, N+1)):
    for s in range(len(V)):
        part_Vi = Vi[s:s+k]
        if 1 not in part_Vi and N not in part_Vi:
            continue
        can_remove = K - k
        part_V = V[s:s+k]
        part_V = sorted(part_V)
        plus_i = 0
        for v in part_V:
            if v < 0:
                plus_i += 1
                can_remove -= 1
            else:
                break
            if can_remove <= 0:
                break
        ans = max(ans, sum(part_V[plus_i:]))
print(ans)


Fixed code:
N, K = map(int, input().split())
V = list(map(int, input().split()))
Vi = [i+1 for i in range(len(V))]
V.extend(V)
Vi.extend(Vi)
ans = 0
for k in range(1, min(K+1, N+1)):
    for s in range(len(V)):
        part_Vi = Vi[s:s+k]
        if 1 not in part_Vi and N not in part_Vi:
            continue
        can_remove = K - k
        part_V = V[s:s+k]
        part_V = sorted(part_V)
        plus_i = 0
        for v in part_V:
            if can_remove <= 0:
                break
            if v < 0:
                plus_i += 1
                can_remove -= 1
            else:
                break
        ans = max(ans, sum(part_V[plus_i:]))
print(ans)
Buggy code:
N, K = map(int, input().split())
V = list(map(int, input().split()))
ans = 0
for i in range(1,K+1):
    for j in range(i+1):
        rec = V[:i-j]+V[N-j:]
        rec.sort(reverse=True)
        away = max(min(0, i, K-i),0)
        for l in range(away+1):
            recsum = sum(rec[:i-l])
            if recsum > ans:
                ans=recsum
print(ans)

Fixed code:
N, K = map(int, input().split())
V = list(map(int, input().split()))
ans = 0
KN = min(K,N)
for i in range(1,KN+1):
    for j in range(i+1):
        rec = V[:i-j]+V[N-j:]
        rec.sort(reverse=True)
        away = max(min(i, K-i),0)
        for l in range(away+1):
            recsum = sum(rec[:i-l])
            if recsum > ans:
                ans=recsum
print(ans)
Buggy code:
read = input 
rn = lambda :list(map(int, read().split()))
# O(N^2)
n, k = rn()
V = rn() # 0 ~ n-1
best = 0
for i in range(0, n + 1): # [0, n]
    for j in range(i + 1, n+1): # [i + 1, n]
        # take [0,i), [j, n)
        yes = V[0:i] + V[j: n]
        if len(yes) > k:
            continue
        leftout = k - len(yes)
        yes.sort()
        skip = 0
        for skip in range(len(yes)):
            if yes[skip] <0 and leftout > 0:
                leftout -= 1
            else :
                break
        if best < sum(yes[skip:]):
            best = sum(yes[skip:])
            print(yes[skip:], k, best)
print(best)

Fixed code:
read = input 
rn = lambda :list(map(int, read().split()))
# O(N^2)
n, k = rn()
V = rn() # 0 ~ n-1
best = 0
for i in range(0, n + 1): # [0, n]
    for j in range(i, n+1): # [i + 1, n]
        # take [0,i), [j, n)
        yes = V[0:i] + V[j: n]
        if len(yes) > k:
            continue
        leftout = k - len(yes)
        yes.sort()
        skip = 0
        for skip in range(len(yes)):
            if yes[skip] <0 and leftout > 0:
                leftout -= 1
            else :
                break
        if best < sum(yes[skip:]):
            best = sum(yes[skip:])
#             print(yes[skip:], k, best)
print(best)
Buggy code:
n,k=map(int,input().split())
V=list(map(int,input().split()))
ans=0
for i in range(n+1):
    for j in range(n-i+1):
        print(i, j)
        if i+j>k:
            continue
        tmp=V[:i]+V[n-j:]
        tmp.sort(reverse=True)
        for l in range(k-i-j):
            if tmp and tmp[-1]<0:
                tmp.pop()
            else:
                break
        ans=max(ans,sum(tmp))
print(ans)

Fixed code:
n,k=map(int,input().split())
V=list(map(int,input().split()))
ans=0
for i in range(n+1):
    for j in range(n-i+1):
        if i+j>k:
            continue
        tmp=V[:i]+V[n-j:]
        tmp.sort(reverse=True)
        for l in range(k-i-j):
            if tmp and tmp[-1]<0:
                tmp.pop()
            else:
                break
        ans=max(ans,sum(tmp))
print(ans)
Buggy code:
#ABC128-D
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
n,k=IL()
V=IL()
ans=0

for i in range(min(k+1,n+1)):
    
    print("i",i)
    for j in range(i+1):
        t=0
        m=[]
        for l in range(j):
            if V[l]<0:
                m.append(V[l])
            else:
                t+=V[l]
        for l in range(i-j):
            if V[-l-1]<0:
                m.append(V[-l-1])
            else:
                t+=V[-l-1]
        m.sort(reverse=True)
        if len(m)>k-i:
            t+=sum(m[:len(m)-(k-i)])
       
        
        ans=max(ans,t)
print(ans)

Fixed code:
#ABC128-D
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
n,k=IL()
V=IL()
ans=0

for i in range(min(k+1,n+1)):
    
    
    for j in range(i+1):
        t=0
        m=[]
        for l in range(j):
            if V[l]<0:
                m.append(V[l])
            else:
                t+=V[l]
        for l in range(i-j):
            if V[-l-1]<0:
                m.append(V[-l-1])
            else:
                t+=V[-l-1]
        m.sort(reverse=True)
        if len(m)>k-i:
            t+=sum(m[:len(m)-(k-i)])
       
        
        ans=max(ans,t)
print(ans)
Buggy code:
a,b = input().split()
a = int(a)
b = int(b)
S = a*b
C = 2 * (a+b)

print(S + " " + C)


Fixed code:
a,b = input().split()
a = int(a)
b = int(b)
S = a*b
C = 2 * (a+b)

print(str(S) + " " + str(C))
Buggy code:
s=split(input())
a=int(s[0])
b=int(s[1])
x=a*b
y=2*(a+b)
print(x,y)

Fixed code:
s=input().split()
a=int(s[0])
b=int(s[1])
x=a*b
y=2*(a+b)
print(x,y)
Buggy code:
a, b = list(map(int, split.()))
print(a*b, 2*(a+b))

Fixed code:
a, b = list(map(int, input().split()))
print(a * b, 2*(a + b))
Buggy code:
ab = [int(n) for n in input().split()]

S = ab[0]*ab[1]
L = 2*ab[0] + 2*ab[1]

print(" ".join(str,map([S,L])))



Fixed code:
ab = [int(n) for n in input().split()]
 
S = ab[0]*ab[1]
L = 2*ab[0] + 2*ab[1]
 
print(" ".join(map(str,[S,L])))
Buggy code:
a , b = map(int, input().split())
print(a * b, ' ', (a + b) * 2) 


Fixed code:
a,b = map(int,input().split())
print(str(a * b) + " " + str(( a * 2 + b * 2)))
Buggy code:
a,b = map(int,input.split())

print(a*b 2*(a+b))

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

print(a*b, 2*(a+b))
Buggy code:
a, b = (int(x) for x in input().split())

print(a*b, " ", (2*a)+(2*b))



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

print(a*b, (2*a)+(2*b))
Buggy code:
i = j = 0
n = ''
m = ''


line = input()

while line[i] != ' ':
    n = n + line[i]
    i += 1
    
while i < len(line):
    m = m + line[i]
    i += 1
    
n = int(n)
m = int(m)

print(n*m 2*n+2*m)

Fixed code:
i = j = 0
n = ''
m = ''


line = input()

while line[i] != ' ':
    n = n + line[i]
    i += 1
    
while i < len(line):
    m = m + line[i]
    i += 1
    
n = int(n)
m = int(m)

print(n*m,end=' ')
print(2*n+2*m)
Buggy code:
a, b = map(int, input().split())
print(a*b 2*a+2*b)

Fixed code:
l=input().split()
a,b=map(int,l)
print(a*b,2*(a+b))
Buggy code:
a,b=map(int,input().split())
print(a*b)
print(2*(a+b))


Fixed code:
a, b = map(int,input().split())
print(a*b,(a+b)*2)
Buggy code:
num = list(map(int,input().split()))

print("%d %d" % (num[0]*num[1],num[0]+num[1]))



Fixed code:
num = list(map(int,input().split()))

print("%d %d" % (num[0]*num[1],(num[0]+num[1])*2))
Buggy code:
x, y = [int(i) for i in input().split()]

s = x * y
l = (x + y) * 2
print("x " + "l")

Fixed code:
x, y = [int(i) for i in input().split()]

s = x * y
l = (x + y) * 2
print(str(s)+" "+ str(l))
Buggy code:
a,b=map(int, input().split())

print(a*b,' ',a*2+b*2)


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

print(a*b,2*a+2*b)
Buggy code:
a,b= input().split()
print a*b, 2*(a+b)

Fixed code:
a, b = input().split()
a = int(a)
b = int(b)
print(a * b, 2 * (a + b))
Buggy code:
nums = input().split()
a = int(nums[0])
b = int(num[1])
print(a * b,(a+b)*2)

Fixed code:
nums = input().split()
a = int(nums[0])
b = int(nums[1])
print(a * b,(a+b)*2)
Buggy code:
a, b = int(input().split())
print(a*b, (a+b)*2)


Fixed code:
a, b = input().split();
a, b = int(a), int(b);
print(a*b, 2*(a+b));
Buggy code:
x = input()
x = x.split()
a = int(x[0])
b = int(x[1])
print(a*2,b*2)


Fixed code:
x = input()
x = x.split()
a = int(x[0])
b = int(x[1])
print(a*b,a*2 + b*2)
Buggy code:
a,b = map(int,input().split())
print a*b,(a+b)*2

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

print(a*b, 2*(a+b))
Buggy code:
item = [int(i) for i in input().split()]
print(item[0]*item[1]+" "+2*(item[0]+item[1]))

Fixed code:
item = [int(i) for i in input().split()]
print(item[0]*item[1],2*(item[0]+item[1]))
Buggy code:
x, y = map(int, input().split())
x = a*b
y = (a+b)*2

print(x, y)


Fixed code:
a, b = map(int, input().split())
x = a*b
y = (a+b)*2

print(x, y)
Buggy code:
 h, w = map(int, src.input().split())

print(h*w, 2*h+2*w)



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

print(h*w, 2*h+2*w)
Buggy code:
[a, b] = map(int, input().split())
print(a*b + " " + (a+b)*2)

Fixed code:
[a, b] = map(int, input().split())
print(a*b, (a+b)*2)
Buggy code:
input_line = input().split()
a = int(input_line[0])
b = int(input_line[1])

print(a*b," ",2*a + 2*b)

Fixed code:
input_line = input().split()
a = int(input_line[0])
b = int(input_line[1])
print(a*b,a*2+b*2)
Buggy code:
a=input().split('')
print(int(a[0])*int(a[1]), end=' ')
print(int(a[0])*2+int(a[1])*2)

Fixed code:
a=input().split()
print(int(a[0])*int(a[1]), end=' ')
print(int(a[0])*2+int(a[1])*2)
Buggy code:
a, b = (int(x) for x in input().split())
area = float(a*b)/2
perimeter = (a+b)*2
print(area, perimeter)



Fixed code:
a, b = (int(x) for x in input().split())
area = a*b
perimeter = (a+b)*2
print(area, perimeter)
Buggy code:
s = input()
ss = s.plit(" ")
a = int(ss[0])
b = int(ss[1])
print("{} {}".format(a*b, 2*(a+b))



Fixed code:
s = input()
ss = s.split(" ")
a = int(ss[0])
b = int(ss[1])
print("{} {}".format(a*b, 2*(a+b)))
Buggy code:
a,b = map(int,input().split())
print(a*b,' ',(2*a)+(2*b))


Fixed code:
a,b = map(int,input().split(" "))
print(a*b,a*2+b*2)
Buggy code:
a, b = map(int, input().split())
s = a*b
l= a*2 + b*2
print(s+" "+l)


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

s = a*b
l = a*2 + b*2
print(a*b,(a*2 + b*2))
Buggy code:
x = int(input().split(" "))
a = x[0] * x[1]
b = x[0] + x[1] + x[0] + x[1]
print(str(a) + str(b))


Fixed code:
x = input().split(" ")
a = int(x[0]) * int(x[1])
b = int(x[0]) + int(x[1]) + int(x[0]) + int(x[1])
print(str(a) +" " + str(b))
Buggy code:
a,b = int(input().split())
area = a*b
mawari_length = (a+b)*2
print(area,mawari_length)

Fixed code:
a,b = input().split()
a = int(a)
b = int(b)
area = a*b
mawari_length = (a+b)*2
print(area,mawari_length)
Buggy code:
a, b = map(int, input().split(' '))
print('{} {}'.format(a*b, 2(a+b)))

Fixed code:
a, b = map(int, input().split(' '))
print('{} {}'.format(a*b, 2*(a+b)))
Buggy code:
a, b = map(int, input().split( )
area = a*b
perimeter = 2*(a+b)
print(area, perimeter)

Fixed code:
a, b = map(int, input().split(" "))
area = a*b
perimeter = 2*(a+b)
print(area, perimeter)
Buggy code:
a, b=map(int, input().split())
print(a, b)
x=a*b
y=2*a+2*b
print(x, y)


Fixed code:
a, b=map(int, input().split())
x=a*b
y=2*a+2*b
print(x, y)
Buggy code:
(a,b) = map(int,input().split())
print a*b,2*(a+b)

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

print(a*b, 2*(a+b))
Buggy code:
x = input()
x = x.split(" ")

width = float(x[0])
height = float(x[1])

area = width * height
perimeter = width * 2 + height * 2

print("{0} {1}".format(area, perimeter))

Fixed code:
x = input()
x = x.split(" ")

width = int(x[0])
height = int(x[1])

area = width * height
perimeter = width * 2 + height * 2

print("{0} {1}".format(area, perimeter))
Buggy code:
nums = list(map(int, input().split()))
print(nums[0] * nums[1])
print((nums[0] + nums[1]) * 2)

Fixed code:
nums = list(map(int, input().split()))
print(nums[0] * nums[1], (nums[0] + nums[1]) * 2)
Buggy code:
import sys
a,b = map(int(sys.stdin.readline().split()))
print(a*b,2(a+b))


Fixed code:
import sys
a,b=map(int,sys.stdin.readline().split())
print(a*b,2*(a+b))
Buggy code:
a, b = map(int, input().split())
print(a*b, a+b)

Fixed code:
a,b = map(int,input().split())
print(a*b,(a*2)+(b*2))
Buggy code:
a,b = [int(i) for i in input().split()]
print(a * b,(a + b) * 2))

Fixed code:
a, b = [int(i) for i in input().split()]
print(a * b,(a + b) * 2)
Buggy code:
a, b = map(int.input().split())
print(a * b, a * 2 + b * 2) 

Fixed code:
a,b = map(int, input().split())
print(a*b, a+b+a+b)
Buggy code:
lis=0
S=0
L=0
lis=input().split()
S=int(lis[0])*int(lis[1])
L=int(lis[0])*2+int(lis[1]*2)
print(S,L)

Fixed code:
lis=0
S=0
L=0
lis=input().split()
S=int(lis[0])*int(lis[1])
L=int(lis[0])*2+int(lis[1])*2
print(S,L)
Buggy code:
a, b = [int(x) for i in input().split()]
m = a * b
n = a * 2 + b * 2
print(m, n)

Fixed code:
a, b = [int(x) for x in input().split()]
m = a * b
n = a * 2 + b * 2
print(m, n)
Buggy code:
data = int(input().split())
a = data[0]
b = data[1]
print(a * b, end = " ")
print(a* 2 + b * 2, end = "\n")

Fixed code:
data = input().split()
a = int(data[0])
b = int(data[1])
print(a * b, end = " ")
print(a *2 + b * 2, end = "\n")
Buggy code:
a, b = [temp for temp in input().split()]
print(a * b, (a + b) * 2)

Fixed code:
a, b = [int(temp) for temp in input().split()]
print(a * b, (a + b) * 2)
Buggy code:
a=input().split()
b=int(a[0])*int(a[1])
c=(int(a[0])+int(a[1]))*2
print(b+" "+c)

Fixed code:
a=input().split()
b=int(a[0])*int(a[1])
c=(int(a[0])+int(a[1]))*2
print(b,end="")
print(" ",end="")
print(c)
Buggy code:
x=str(input())
n=x.split(" ", 2)
a=int(n[0])
b=int(n[1])
ab=a*b
a_b=(a+b)*2
print('ab', end=' ')
print('a_b')

Fixed code:
x=str(input())
n=x.split(" ", 2)
a=int(n[0])
b=int(n[1])
ab=a*b
a_b=(a+b)*2
print(ab, end=' ')
print(a_b)
Buggy code:
inp=input()
abl=inp.split()
map(int,abl)
a,b=list(map(int,abl))

print(a*b,2(a+b))


Fixed code:
inp=input()
abl=inp.split()
map(int,abl)
a,b=list(map(int,abl))

print(a*b,2*(a+b))
Buggy code:
a, b = map(int, input().split())
print(a*b, 2*(a+B))

Fixed code:
a, b = map(int, input().split())
print (a*b, 2*a+2*b)
Buggy code:
def rect (a,b):
    return a*2,b*4 
    
s=input()
x=s.split()
a= int(x[0])
b=int (x[1])

area,perimeter=rect(a,b)
print(area,perimeter)


Fixed code:
def rect (a,b):
    return a*b,b*2+a*2 
    
s=input()
x=s.split()
a= int(x[0])
b=int (x[1])

area,perimeter=rect(a,b)
print(area,perimeter)
Buggy code:
a, b = map(int,input().split())
M = a * b
S = a + b
print(M,S)

Fixed code:
a, b = map(int,input().split())
M = a * b
S = 2 * (a + b)
print(M,S)
Buggy code:
input = input().split(' ')
a = int(input[0])
b = int(input[1])
x = a * b
y = (a + b) * 2
print("{} {}".format(a, b))

Fixed code:
input = input().split(' ')
a = int(input[0])
b = int(input[1])
x = a * b
y = (a + b) * 2
print("{} {}".format(x, y))
Buggy code:
input = list(map(lambda n: int(n), input().split(' '))
a = input[0]
b = input[1]
x = a * b
y = (a + b) * 2
print("{} {}".format(a, b))

Fixed code:
input = list(map(lambda n: int(n), input().split(' ')))
x = input[0] * input[1]
y = (input[0] + input[1]) * 2
print("{} {}".format(x, y))
Buggy code:
s = input().split()
print(int(s[0])*int(s[1]),int(s[0])*2+int(s[1]*2))

Fixed code:
s = input().split()
print(int(s[0])*int(s[1]),int(s[0])*2+int(s[1])*2)
Buggy code:
 i=input()
 
 a,b = i.split(' ')
 v,h = int(a),int(b)
 
 area = v * h
 div = 2 * (v + h)
 
 print(' '.join([str(area),str(div)]))                                      

Fixed code:
i=input()
 
a,b = i.split(' ')
v,h = int(a),int(b)
 
area = v * h
div = 2 * (v + h)
 
print(' '.join([str(area),str(div)]))
Buggy code:
a,b = map(int,input().split())
print(a * b,' ',a*2 + b*2)

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

print(a*b,2*(a+b))
Buggy code:
a,b=map(int, input().split())
print(a*b +' '+2*a*b)

Fixed code:
a, b = map(int, input().split())
print(a*b, 2 * (a + b))
Buggy code:
a,b = map(int,input().split()

print(a*b, a*2 + b*2)

Fixed code:
l = input()
a,b = map(int, l.split())
print(a*b, 2*(a+b))
Buggy code:
a,b = map(int, input().split())
c=a*b
d=2*(a+b)


Fixed code:
a,b = map(int, input().split())
c=a*b
d=2*(a+b)
print(c,d)
Buggy code:
import sys

a,b = map(int(x) ,sys.stdin.readline().split())
area = a*b
surround = 2*(a+b)
print("%d %d" % (area, surround))

Fixed code:
import sys

a,b = map(int,sys.stdin.readline().split())
area = a*b
surround = 2*(a+b)
print("%d %d" % (area, surround))
Buggy code:
a,b = int(input().split())

print(a * b)
print(2 * (a + b))

Fixed code:
a,b = map(int,input().split())
print(a*b, 2*(a+b))
Buggy code:
a,b=map(int,input().split())
print(a*b)
print(2*a+2*B)


Fixed code:
a, b=map(int,input().split())
print(a*b,(a+b)*2)
Buggy code:
a,b = map(int,input().split())
c = a * b
d = 2 * (a + b)
print('{} {}'.format(a,d)) 

Fixed code:
a,b = map(int,input().split())
c = a * b
d = 2 * (a + b)
print('{} {}'.format(c,d))
Buggy code:
list = input().split()
x = int(list[0])
y = int(list[0])
print(x*y, x*2+y*2)

Fixed code:
list = input().split()
x = int(list[0])
y = int(list[1])
print(x*y, x*2+y*2)
Buggy code:
a,b = (int,input().split())
print(a*b, (a+b)*2)


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

print(a * b, 2 * (a + b))
Buggy code:
x,y=[int(i) for i in input().split()]
s=x*y
l=2*x+2*y
print(s," ",l)

Fixed code:
x,y=[int(i) for i in input().split()]
s=x*y
l=2*x+2*y
print(s,l)
Buggy code:
a,b=map(int,input().split())
print(a*b,(a+b)*2

Fixed code:
a,b=map(int,input().split())
print(a*b,a+b+a+b)
Buggy code:
x,y = map(int,input().split().strip())
s=x*y
p=2*(x+y)
print("%d %d"%(s,p))

Fixed code:
x,y = map(int,input().split())
s=x*y
p=2*(x+y)
print("%d %d"%(s,p))
Buggy code:
a, b = [float(i) for i in input().split()]
s = a * b
l = (a + b) * 2
print(s, l)

Fixed code:
a, b = [int(i) for i in input().split()]
s = a * b
l = (a + b) * 2
print(s, l)
Buggy code:
A, B = map(int, input().split())
print((A*B) + " " + (2*A+2*B))


Fixed code:
A,B =map(int ,input().split())
print(A * B,2*(A +B))
Buggy code:
a,b = map(int,input(),split())
print(a * b,(a + b) * 2)


Fixed code:
a, b = map(int, input().split())
 
print(a * b, 2 * (a + b))
Buggy code:
input_str = input()

split_list = input_str.split()

print((int(split_list[0]) * int(split_list[1]),(int(split_list[0]) * 2 + int(split_list[1]) * 2))
 

Fixed code:
input_str = input()

split_list = input_str.split()

print(int(split_list[0]) * int(split_list[1]), int(split_list[0]) * 2 + int(split_list[1]) * 2)
Buggy code:
a,b=map(int,input().split())
print(f'{a*b} {(a+b)*2})

Fixed code:
a,b=map(int,input().split())
print(f'{a*b} {(a+b)*2}')
Buggy code:
 a, b = map(int,input().split())
 print("%d %d" %(a*b, 2*a+2*b))



Fixed code:
a, b = map(int,input().split())
print("%d %d" %(a*b, 2*(a+b) ) )
Buggy code:
a. b = map(int, input().split())
print(a*b, 2*(a+b))

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

print(a * b,a + a + b + b)
Buggy code:
a,b = int(input().split())
S = a*b
L = 2*(a+b)
print(S,end="")
print(L)

Fixed code:
a,b = map(int,input().split())
S = a*b
L = 2*(a+b)
print(S,end=" ")
print(L)
Buggy code:
a, b = map(int, input().split())
print(a * b, end=' ')
print(2 * a * b)

Fixed code:
a, b = map(int, input().split())
print(a * b, end=' ')
print(2 * (a + b))
Buggy code:
# coding: utf-8
# Here your code !
a,b = input().split()
m = int(a) * int(b)
s = int(a) * 2 + int(b) * 2
print(s,m)

Fixed code:
# coding: utf-8
# Here your code !
a,b = input().split()
m = int(a) * 2 + int(b) * 2
s = int(a) * int(b)
print(s,m)
Buggy code:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    print('%d %d' % (a[0] * a[1], 2 * (a[0] + a[1]))

if __name__ == "__main__":
    main()


Fixed code:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    print('%d %d' % (a[0] * a[1], 2 * (a[0] + a[1])))

if __name__ == "__main__":
    main()
Buggy code:
i = list(map(int,input().split()))
a = i[0]*i[1]
b = 2*(i[0]*i[1])
print("{0} {1}".format(a,b))


Fixed code:
i = list(map(int,input().split()))
a = i[0]*i[1]
b = 2*(i[0]+i[1])
print("{0} {1}".format(a,b))
Buggy code:
def rect(a,b):
    return a*2, b+2
n =input()
x =n.split()
a =int(x[0])
b =int(x[1])

area, perimeter =rect(a,b)
print(area, perimeter)


Fixed code:
def rect(a,b):
    return a*b, 2*(a+b)
n = input()
s = n.split()
a = int(s[0])
b = int(s[1])
area, perimeter = rect(a,b)
print(area,perimeter)
Buggy code:
a, b = map(int, input().split())
print(a * b)
print(2 * a * b)

Fixed code:
a , b = map(int, input().split())
print(a * b, (a + b) * 2)
Buggy code:
# -*- coding:UTF-8 -*-
num = input().split()
print(int(num[0]) * int(num[1]), int(num[0])*2 + int(num[1]*2))

Fixed code:
# -*- coding:UTF-8 -*-
num = input().split()
print(int(num[0]) * int(num[1]), int(num[0])*2 + int(num[1])*2)
Buggy code:
# 02-Getting_Started-Rectangle.py

# ????????¢?????¢?????¨??¨?????????
# ?????? a cm ?????? b cm ???????????¢?????¢?????¨??¨?????????????±???????????????°?????????????????????????????????

# Input
# a ??¨ b ????????????????????§????????????????????????????????????
# Output
# ??¢?????¨??¨?????????????????????????????§????????£????????????????????????????????????

# Sample Input
# 3 5
# Sample Output
# 15 16

# print("a??¨b?????\??????")
a,b=map(int,input().split())
# print("a=%d, b=%d."%(a,b))

# print("??¢??????%f ."%(a*b));
# print("??¨????????????%f ."%(2*a+2*b));
print("%f ."%(a*b));
print("%f ."%(2*a+2*b));

Fixed code:
# 02-Getting_Started-Rectangle.py

# ????????¢?????¢?????¨??¨?????????
# ?????? a cm ?????? b cm ???????????¢?????¢?????¨??¨?????????????±???????????????°?????????????????????????????????

# Input
# a ??¨ b ????????????????????§????????????????????????????????????
# Output
# ??¢?????¨??¨?????????????????????????????§????????£????????????????????????????????????

# Sample Input
# 3 5
# Sample Output
# 15 16

# print("a??¨b?????\??????")
a,b=map(int,input().split())
# print("a=%d, b=%d."%(a,b))

# print("??¢??????%f ."%(a*b));
# print("??¨????????????%f ."%(2*a+2*b));
print("%d %d"%(a*b, 2*a+2*b));
Buggy code:
a,b = [int(i) for i in input().split()]
print(a+b,(a+b)*2)

Fixed code:
a,b=[int(i) for i in input().split()]
print(a*b,(a+b)*2)