Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s=input()
while s>0:
  if s[-5:]=='dream':
    s=s[:-5]
  elif s[-5:]=='erase':
    s=s[:-5]
  elif s[-6:]=='eraser':
    s=s[:-6]
  elif s[:-7]=='dreamer':
    s=s[:-7]
  else:
    print('NO')
    exit()
print('YES')

Fixed submission:
s=input()
while len(s)>4:
  if s[-5:]=='dream':
    s=s[:-5]
  elif s[-5:]=='erase':
    s=s[:-5]
  elif len(s)<6:
    print('NO')
    exit()
  elif s[-6:]=='eraser':
    s=s[:-6]
  elif len(s)<7:
    print('NO')
    exit()
  elif s[-7:]=='dreamer':
    s=s[:-7]
  else:
    print('NO')
    exit()
print('YES')
Buggy python submission (verdict: Runtime Error):
s=input()
ans=0
for i in range(len(s):):
  if s[i]!=s[i+1]:
    ans+=1
print(ans)

Fixed submission:
s=input()
ans=0
for i in range(len(s)-1):
  if s[i]!=s[i+1]:
    ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
n=input()
ans=0
def dfs(i,flag):
  global ans
  if i!=len(n)-1:
    dfs(i+1,flag)
    dfs(i+1,flag|2**i)
  else:
    num=[]
    start=0
    for i in range(len(n)):
      if flag&2**i>0:
        num.append(n[start:i+1])
        start=i+1
    ans+=sum(num)

dfs(0,0)
print(ans)

Fixed submission:
n=input()
ans=0
def dfs(i,flag):
  global ans
  if i!=len(n)-1:
    dfs(i+1,flag)
    dfs(i+1,flag|2**i)
  else:
    num=[]
    start=0
    for i in range(len(n)):
      if flag&2**i>0:
        num.append(int(n[start:i+1]))
        start=i+1
    if start!=n:
      num.append(int(n[start:]))
    ans+=sum(num)
dfs(0,0)
print(ans)

Buggy python submission (verdict: Runtime Error):
n=input()
ans=0
def dfs(i,flag):
  if i!=len(n)-1:
    dfs(i+1,flag)
    dfs(i+1,flag|2**i)
  else:
    num=[]
    start=0
    for i in range(len(n)):
      if flag&2**i>0:
        num.append(n[start:i+1])
        start=i+1
    ans+=sum(num)

dfs(0,0)
print(ans)

Fixed submission:
n=input()
ans=0
def dfs(i,flag):
  global ans
  if i!=len(n)-1:
    dfs(i+1,flag)
    dfs(i+1,flag|2**i)
  else:
    num=[]
    start=0
    for i in range(len(n)):
      if flag&2**i>0:
        num.append(int(n[start:i+1]))
        start=i+1
    if start!=n:
      num.append(int(n[start:]))
    ans+=sum(num)
dfs(0,0)
print(ans)
Buggy python submission (verdict: Runtime Error):
n,a=map(int,input().split())
x=list(map(int,input()))
stack=[0]*5001
stack[2500-a]=1
ans=0
for i in x:
  i-=a
for i in x:
  ans+=stack[2500-i+a]
  stack2=[i for i in stack]
  for j in range(5001):
    if 0<=j+i<=5000:
      stack2[j+i]+=stack[j]
  stack=[i for i in stack2]
print(stack[2500])

Fixed submission:
n,a=map(int,input().split())
x=list(map(int,input().split()))
stack=[0]*5001
stack[2500]=1
ans=0
for i in range(len(x)):
  x[i]-=a
for i in x:
  ans+=stack[2500-i]
  stack2=[i for i in stack]
  for j in range(5001):
    if 0<=j+i<=5000:
      stack2[j+i]+=stack[j]
  stack=[i for i in stack2]
print(stack[2500]-1)
Buggy python submission (verdict: Runtime Error):
n,l=map(int,input().split())
ans=[]
for i in range(n):
  s=list(input())
  ans.append(s)
ans.sort()
answer=""
for i in ans:
  answer+=i
print(answer)

Fixed submission:
n,l=map(int,input().split())
ans=[]
for i in range(n):
  s=list(input())
  ans.append(s)
ans.sort()
answer=""
for i in ans:
  p="".join(i)
  answer+=p
print(answer)
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = list(map(int, input().split()))

score = 1
for i in range(K):
    score *= A[i]

for i in range(K, N):
    tmp = score
    score /= A[i - K]
    score *= A[i]
    if int(score) > tmp:
        print("Yes")
    else:
        print("No")

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))

score = 1
for i in range(N - K):
    if A[i] < A[i + K]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import math
from collections import Counter
N = int(input())

for i in range(N):
    flg = False
    count = 0
    if i < 5:
        print(count)
    else:
        x_min = 1
        x_max = int(math.sqrt(i + 1))
        for x in range(x_min, x_max + 1):
            x_count = 0
            for y in range(x, x_max + 1):
                y_count = 0
                for z in range(y, x_max + 1):
                    #print(i, x, y, z)
                    if x * x + y * y + z * z + x * y + y * z + z * x == i + 1:
                        x_count += 1
                        y_count += 1
                        numbers = Counter([x, y, z]).values()
                        count += math.factorial(3)
                        for number in numbers:
                            count /= math.factorial(number)
                    elif x * x + y * y + z * z + x * y + y * z + z * x > i + 1:
                        break
                    else:
                        x_count += 1
                        y_count += 1
                if y_count == 0:
                    flg = True
                    break
            if x_count == 0:
                break
            
        print(int(count))

Fixed submission:
N = int(input())
answer = [0] * (10001)

for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            index = x * x + y * y + z * z + x * y + y * z + z * x - 1
            if index > N:
                break
            answer[index] += 1
            

for i in range(N):
    print(answer[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
from collections import Counter
N = int(input())

for i in range(N):
    x_flg = False
    y_flg = False
    count = 0
    if i < 5:
        print(count)
    else:
        x_min = 1
        x_max = int(math.sqrt(i + 1))
        for x in range(x_min, x_max + 1):
            for y in range(x, x_max + 1):
                for z in range(y, x_max + 1):
                    #print(i, x, y, z)
                    if x * x + y * y + z * z + x * y + y * z + z * x == i + 1:
                        numbers = Counter([x, y, z]).values()
                        count += math.factorial(3)
                        for number in numbers:
                            count /= math.factorial(number)
                    elif x * x + y * y + z * z + x * y + y * z + z * x > i + 1:
                        break
        print(int(count))

Fixed submission:
N = int(input())
answer = [0] * (10001)

for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            index = x * x + y * y + z * z + x * y + y * z + z * x - 1
            if index > N:
                break
            answer[index] += 1
            

for i in range(N):
    print(answer[i])
Buggy python submission (verdict: Runtime Error):
if A == B:
    print('YES')
elif A < B:
    print('NO')
else:
    if A + V * T >= B + W * T:
        print('YES')
    else:
        print('NO')

Fixed submission:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

a_dis = V * T
b_dis = W * T
dis_diff = abs(B - A)

if dis_diff <= a_dis - b_dis:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

answer = 1
for a in A:
    answer *= a

if answer > 10 ** 18:
    print(-1)
else:
    print(answer)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A = sorted(A)
flag = False
answer = 1
for a in A:
    if A[-1] == 0:
        answer = 0
        break
    else:
        answer *= a
        if answer > 10 ** 18:
            flag = True
            break

if flag:
    print(-1)
else:
    print(answer)
Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
for B in range(X + 1):
    p_A = (B ** 5 + X) ** (1 / 5)
    n_A = ((-1 * B) ** 5 + X) ** (1 / 5)
    if isinstance(p_A, complex) == False and isinstance(n_A, complex) == False:
        if int(p_A) ** 5 - B ** 5 == X:
            print(int(p_A), B)
            break
        if int(n_A) ** 5 - (-1 * B) ** 5 == X:
            print(int(n_A), -1 * B)
            break

Fixed submission:
X = int(input())
stop = False
for A in range(-118, 120):
    for B in range(-119, 129):
        if A ** 5 - B ** 5 == X:
            print(A, B)
            stop = True
    if stop:
        break

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
for B in range(X + 1):
    p_A = (B ** 5 + X) ** (1 / 5)
    n_A = ((-1 * B) ** 5 + X) ** (1 / 5)
    if isinstance(p_A, complex):
        pass
    elif isinstance(n_A, complex):
        pass
    else:
        if int(p_A) ** 5 - B ** 5 == X:
            print(int(p_A), B)
            break
        if int(n_A) ** 5 - (-1 * B) ** 5 == X:
            print(int(n_A), -1 * B)
            break
        

Fixed submission:
X = int(input())
stop = False
for A in range(-118, 120):
    for B in range(-119, 129):
        if A ** 5 - B ** 5 == X:
            print(A, B)
            stop = True
    if stop:
        break
Buggy python submission (verdict: Time Limit Exceeded):
A, B, N = map(int, input().split())
answer = 0

if B / 2 > N:
    num = reversed(range(1, N + 1))
else:
    num = range(1, N + 1)

for x in num:
    value = int(A * x / B) - A * int(x / B)
    if answer <= value:
        answer = value
    
    if x == B:
        break

print(answer)

Fixed submission:
A, B, N = map(int, input().split())
answer = 0

if N < B:
    x = N
else:
    x = B - 1

value = int(A * x / B) - A * int(x / B)
print(value)

Buggy python submission (verdict: Time Limit Exceeded):
A, B, N = map(int, input().split())
answer = 0

if B > N:
    reverse = True
    num = reversed(range(1, N + 1))
else:
    reverse = False
    num = range(1, N + 1)

for x in num:
    value = int(A * x / B) - A * int(x / B)
    if answer <= value:
        answer = value
    
    if x == B:
        break

print(answer)

Fixed submission:
A, B, N = map(int, input().split())
answer = 0

if N < B:
    x = N
else:
    x = B - 1

value = int(A * x / B) - A * int(x / B)
print(value)

Buggy python submission (verdict: Time Limit Exceeded):
A, B, N = map(int, input().split())
answer = 0

if B > N:
    reverse = True
    num = reversed(range(1, N + 1))
else:
    reverse = False
    num = range(1, N + 1)

for x in num:
    value = int(A * x / B) - A * int(x / B)
    if answer <= value:
        answer = value
    
    if x == B:
        break

print(answer)

Fixed submission:
A, B, N = map(int, input().split())
answer = 0

if N < B:
    x = N
else:
    x = B - 1

value = int(A * x / B) - A * int(x / B)
print(value)

Buggy python submission (verdict: Time Limit Exceeded):
A, B, N = map(int, input().split())
answer = 0

if B > N:
    reverse = True
else:
    reverse = False

if reverse:
    for x in reversed(range(1, N + 1)):
        if x == B:
            break
        else:
            value = int(A * x / B) - A * int(x / B)
            if answer <= value:
                answer = value
else:
    for x in range(1, N + 1):
        if x == B:
            break
        else:
            value = int(A * x / B) - A * int(x / B)
            if answer <= value:
                answer = value

print(answer)

Fixed submission:
A, B, N = map(int, input().split())
answer = 0

if N < B:
    x = N
else:
    x = B - 1

value = int(A * x / B) - A * int(x / B)
print(value)
Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
min = math.inf
for i in range(1, 1000000):
    if N % i == 0:
        val = i + int(N / i) - 2
    if min > val:
        min = val

print(min)

Fixed submission:
N = int(input())
min = 10000000000001
for i in range(1, 1000001):
    if N % i == 0:
        val = i + int(N / i) - 2
    if min > val:
        min = val

print(min)
Buggy python submission (verdict: Runtime Error):
import bisect
N=int(input())
L=list(map(int, input().split()))
ans=0
L_LENGTH=len(L)
L=sorted(L)
for i in range(L_LENGTH-2):
    for j in range(i+1, L_LENGTH-1):
        a=L[i]+L[j]
        idx=bisect.bisect_left(l, t)
        ans+=max(0, idx-j-1)
print(ans)


Fixed submission:
import bisect
N=int(input())
L=list(map(int, input().split()))
ans=0
L_LENGTH=len(L)
L=sorted(L)
for i in range(L_LENGTH-2):
    for j in range(i+1, L_LENGTH-1):
        a=L[i]+L[j]
        idx=bisect.bisect_left(L, a)
        ans+=max(0, idx-j-1)
print(ans)
Buggy python submission (verdict: Runtime Error):
N, X = map(int, input().split())
e = [int(i) for i in input().split()]
count = 0
d = 0
for i in range(N+1):
    count += 1
    d += e[i]
    if d > X:
        break

print(count)

Fixed submission:
N, X = map(int, input().split())
e = [int(i) for i in input().split()]
count = 1
d = 0
for i in range(N):
    d += e[i]
    if d > X:
        break
    else:
        count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(i) for i in input().split()]
A = sorted(A)
removeNums = []
for i in range(len(A)-1):
    newValue = A[0] - A[-1]
    removeNums.append((A[0], A[-1]))
    A.remove(A[0])
    A.remove(A[-1])
    A.insert(0, newValue)

print(-1*A[0])
for i in range(len(removeNums)-1):
    print(removeNums[i][0], removeNums[i][1])

print(removeNums[-1][1], removeNums[-1][0])


Fixed submission:
N, K = map(int, input().split())
print(N%K)
Buggy python submission (verdict: Runtime Error):
import collections
N = int(input())
e = [[int(i) for i in input().split()] for i in range(N)]
x = 0
y = 0
tupleArray = []
for i in range(N-1):
    for j in range(i+1, N):
        x = e[i][0] - e[j][0]
        y = e[i][1] - e[j][1]
        t1 = (x, y)
        tupleArray.append(t1)
c = collections.Counter(tupleArray)
print(N - c.most_common()[0][1])


Fixed submission:
from collections import defaultdict
n = int(input())
s = [list(map(int,input().split())) for i in range(n)]
s.sort()
c = []
if n == 1:
    print(1)
else:
    for i in range(n):
        for j in range(i+1,n):
            x = s[j][0] - s[i][0]
            y = s[j][1] - s[i][1]
            c.append(str(x) + " " + str(y))
    r = defaultdict(int)
    for g in c:
        r[g] += 1
    q = list(r.values())
    q1 = max(q)
    print(n-q1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ns = list(map(int, input().split()))

s = 1
for i in ns:
    s=s*i
if s > 10**18:
    print(-1)
else:
    print(s)

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

if 0 in ns:
  print(0)
  exit()

s = 1
for i in ns:
  s=s*i
  if s > 10**18:
    print(-1)
    exit()

print(s)
Buggy python submission (verdict: Runtime Error):
import itertools
import numpy as np

n, m, x = map(int, input().split())
books = [list(map(int, input().split())) for i in range(n)]

coin = []
for i in range(1, m+1):
  for v in itertools.combinations(books, i):
    comb = list(v)
    result = np.sum(comb, axis = 0)
    if result[1] >= x and result[2] >= x and result[3] >= x:
      coin.append(result[0])

if len(coin) > 0:
  sorted(coin, reverse=False)
  print(coin[0])
else:
  print(-1)

Fixed submission:
import itertools
import numpy as np

n, m, x = map(int, input().split())
books = [list(map(int, input().split())) for i in range(n)]

coin = []
for i in range(1, n+1):
  for v in itertools.combinations(books, i):
    comb = list(v)
    result = np.sum(comb, axis = 0)
    
    flag = True
    for j in range(1,m+1):
      if result[j] < x:
        flag = False
        break
    if flag:
      coin.append(result[0])

if len(coin) > 0:
  coin.sort(reverse=False)
  print(coin[0])
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
sunukes = [list(map(int, input().split())) for i in range(k*2)]

names = list(range(1,n+1))
print(sunukes)
for i in range(0,k+2,2):
  syoji = sunukes[i]
  okashi = sunukes[i+1]
  print(syoji,okashi)
  for n in okashi:
    if n in names:
      names.remove(n)

print(len(names))

Fixed submission:
n, k = map(int, input().split())
sunukes = [list(map(int, input().split())) for i in range(k*2)]

names = list(range(1,n+1))
for i in range(0,k):
  j = i*2
  syoji = sunukes[j]
  okashi = sunukes[j+1]
  for n in okashi:
    if n in names:
      names.remove(n)

print(len(names))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
import itertools
import functools
import math
l = list(range(1,n+1))
counter = 0
for v in itertools.product(l, repeat=3):
    gcd = functools.reduce(math.gcd, v)
    counter+=gcd
print(counter)

Fixed submission:
n = int(input())
import itertools
import functools
import math
l = list(range(1,n+1))
counter = 0
for v in itertools.product(l, repeat=3):
    gcd = functools.reduce(math.gcd, v)
    counter+=gcd
print(counter)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
N = int(input())
a = 0
while N != 0:
    a += N % 10
    N = N //10
if a%9 == 0:
    print("Yes")
else:
    print("No")

Fixed submission:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
N = list(input())[:-1]
n = len(N)
b = 0
for i in range(n):
    s = N[i]
    a = int(s)
    b += a
    b %= 9
if b % 9 == 0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input=sys.stdin.readline
#from collections import defaultdict
#d = defaultdict(int)
#import fractions
import math
#import collections
#from collections import deque
#from bisect import bisect_left
K = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
s = 0
d = 0
e = 0
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            d = math.gcd(c,b)
            e = math.gcd(a,d)
            s += e
print(s)

Fixed submission:
import sys
input=sys.stdin.readline
#from collections import defaultdict
#d = defaultdict(int)
#import fractions
import math
#import collections
#from collections import deque
#from bisect import bisect_left
K = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
s = 0
d = 0
e = 0
for a in range(1,K+1):
    for b in range(a,K+1):
        for c in range(b,K+1):
            d = math.gcd(c,b)
            e = math.gcd(a,d)
            if a == b and b == c:
                s += e
            elif a != b and b != c :
                s += 6 * e
            else:
                s += 3 * e
print(s)
Buggy python submission (verdict: Runtime Error):
import sys
input=sys.stdin.readline
S = list(input())
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")import sys

Fixed submission:
import sys
input=sys.stdin.readline
S = list(input())
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import sys
input=sys.stdin.readline
N,M = map(int,input().split())
nCr = {}
def cmb(n, r):
    if r == 0 or r == n:
         return 1
    if r == 1:
         return n
    if (n,r) in nCr:
         return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]

a = cmb(N,2)
b = cmb(M,2)
print(a+b)

Fixed submission:
import sys
input=sys.stdin.readline
N,M = map(int,input().split())
nCr = {}
def cmb(n, r):
    if n == 0:
        return 0
    if r == 0 or r == n:
         return 1
    if r == 1:
         return n
    if (n,r) in nCr:
         return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]

a = cmb(N,2)
b = cmb(M,2)
print(a+b)
Buggy python submission (verdict: Runtime Error):
import sys
input=sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))
nCr = {}
def cmb(n, r):
    if n == 0:
        return 0
    if r == 0 or r == n:
         return 1
    if r == 1:
         return n
    if (n,r) in nCr:
         return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]
mydict = {}
for i in range(N):
    a = A[i]
    if a in mydict.keys():
        mydict[a] += 1
    else:
        mydict[a] = 1
for i in range(N):
    s = 0
    a = A[i]
    mydict[a] -= 1
    for j in mydict.values():
        s += cmb(j,2)
    print(s)
    mydict[a] += 1

Fixed submission:
import sys
input=sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))
def cmb(n):
    if n == 1:
        return 0
    else:
        return n * (n-1) /2
mydict = {}
for i in range(N):
    a = A[i]
    if a in mydict.keys():
        mydict[a] += 1
    else:
        mydict[a] = 1
s = 0
for i in mydict.values():
	s += cmb(i)
for i in range(N):
    a = A[i]
    x = mydict[a] - 1
    print(int(s-x))
Buggy python submission (verdict: Runtime Error):
H,W = map(int,input().split())
if (H*W) % 2 == 0:
    print(int(H*W/2)
if (H*W) % 2 == 1:
    print(int((H*W+1)/2))

Fixed submission:
H,W = map(int,input().split())
if H != 1 and W != 1:
    if (H*W) % 2 == 0:
        print(int(H*W/2))
    elif (H*W) % 2 == 1:
        print(int((H*W+1)/2))
else:
    print(1)
Buggy python submission (verdict: Runtime Error):
N,A,B = map(int,input().split())
if A ==0 :
    print(0)
elif B==0:
    print(N)
else:
    m = N % (A+B)
    n = N // (A+B)
    ans = A * n
    if m > A:
        print(ans+A)
    else:
        print(ans+m)



Fixed submission:
S = list(input())
if S[0]  == "A" and S[1]  == "A" and S[2]  == "A":
  print("No")
elif S[0]  == "B" and S[1]  == "B" and S[2]  == "B":
  print("No")
else:
  print("Yes")