Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a=input()

b=input()

print (a-1)*(b-1)

Fixed submission:
n, m = map(int, input().split())
print((n-1) * (m-1))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = int(input())
b = int(input())
print((b - a) * (n - 2) + 1)

Fixed submission:
n,anb,b=map(int,input().split()) 
if n>1 and b>=anb or n==1 and anb==b: 
    print ((n-2)*(b-anb)+1); 
else:
    print ("0");

Buggy python submission (verdict: Runtime Error):
#include<iostream>
using namespace std;
int main()
{
    long long n,a,b;
    cin>>n>>a>>b;
    if(n>1&&b>=a||n==1&&a==b)
        cout<<(n-2)*(b-a)+1<<endl;
    else
        cout<<0<<endl; 
 } 

Fixed submission:
n,anb,b=map(int,input().split()) 
if n>1 and b>=anb or n==1 and anb==b: 
    print ((n-2)*(b-anb)+1); 
else:
    print ("0");

Buggy python submission (verdict: Runtime Error):
c=int(input()),a=int(input()),b=int(input())
print((a+b*c-b)-(a*c-a+b)+1)

Fixed submission:
n,anb,b=map(int,input().split()) 
if n>1 and b>=anb or n==1 and anb==b: 
    print ((n-2)*(b-anb)+1); 
else:
    print ("0");

Buggy python submission (verdict: Runtime Error):
#include<iostream>
#define ll long long
using namespace std;
ll n,a,b;
int main(){
    cin>>n>>a>>b;
    cout<<(b*(n-2)-a*(n-2)+1);
    return 0;
}

Fixed submission:
n,anb,b=map(int,input().split()) 
if n>1 and b>=anb or n==1 and anb==b: 
    print ((n-2)*(b-anb)+1); 
else:
    print ("0");
Buggy python submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;
string s1, s2;
int leng;
int main()
{
    cin >> s1;
    for(int i = s1.size() - 1; i >= 0; i--)
        s2[leng++] = s1[i];
    for(int i = 0; i < leng; i++)
    {
        if(s1[i]=='b') s2[i] = 'd';
        else if (s1[i] == 'd') s2[i] = 'b';
        else if (s1[i] == 'p') s2[i] = 'q';
        else if (s1[i] == 'q') s2[i] = 'p';
    }
    if(!strcmp(s1,s2)) puts("Yes");
    else puts("No");
    return 0;
}

Fixed submission:
s=input()
d={'b':'d','d':'b','p':'q','q':'p'}
if len(s)%2!=0:
    print("No")
else:
    flag=True
    for idx in range(len(s)//2):
        if d[s[idx]]!=s[-idx-1]:
            print("No")
            flag=False
            break
    if flag:
        print("Yes")
Buggy python submission (verdict: Runtime Error):
s = input()
c = False
f = False
for i in s:
    if (i=='C') c = True
    if (i=='F') f = True
    if (c==True and f==True) print("Yes")
if (not(c==True and f==True)) print("No")

Fixed submission:
s = input()
if s.count('C') == 0 or s.count('F') == 0:
    print('No')
else:
    s = s[s.find('C'):]
    if s.count('F') == 0:
        print('No')
    else:
        print('Yes')

Buggy python submission (verdict: Runtime Error):
// luogu-judger-enable-o2
a = input()
if a.find("C")!=-1 and a.find("F")!=-1 and a.find("C")<a.find("F"):
    print("Yes")
else:
    print("No")

Fixed submission:
s = input()
if s.count('C') == 0 or s.count('F') == 0:
    print('No')
else:
    s = s[s.find('C'):]
    if s.count('F') == 0:
        print('No')
    else:
        print('Yes')

Buggy python submission (verdict: Runtime Error):
strstart = input()
wzc = 0
wzf = 0
for i in strstart:
    i2 += 1
    if i == 'C':
        wzc = i2
    if i == 'F':
        wzf = i2
if wzc < wzf:
    print('YES')
else:
    print('NO')

Fixed submission:
s = input()
if s.count('C') == 0 or s.count('F') == 0:
    print('No')
else:
    s = s[s.find('C'):]
    if s.count('F') == 0:
        print('No')
    else:
        print('Yes')

Buggy python submission (verdict: Runtime Error):
#AT2084
s = list(input())
a = []
for i in s:
    if i == 'C' or i == 'F':
        a.append(i)
if a[0] == 'C' and a[1] == 'F' and len(a) == 2:
    print('Yes')
else:
    print('No')


Fixed submission:
s = input()
if s.count('C') == 0 or s.count('F') == 0:
    print('No')
else:
    s = s[s.find('C'):]
    if s.count('F') == 0:
        print('No')
    else:
        print('Yes')

Buggy python submission (verdict: Runtime Error):
strstart = input()
wzc = 0
wzf = 0
for i in strstart:
    i2 += 1
    if i == 'C':
        wzc = i2
    if i == 'F':
        wzf = i2
if wzc < wzf:
    print('YES')
else:
    print('NO')

Fixed submission:
s = input()
if s.count('C') == 0 or s.count('F') == 0:
    print('No')
else:
    s = s[s.find('C'):]
    if s.count('F') == 0:
        print('No')
    else:
        print('Yes')

Buggy python submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;
int main(){
	char c[65000];
	int i,j=0,l;
	cin>>c;
	l=strlen(c);
	for(i=0;i<l;i++){
		if(c[i]=='C'){
			j=1;
		}
		if(c[i]=='F'){
			if(j==1){
				cout<<"YES";
				return 0;
			}
		} 
	}
	cout<<"NO";
	return 0;
}

Fixed submission:
s = input()
if s.count('C') == 0 or s.count('F') == 0:
    print('No')
else:
    s = s[s.find('C'):]
    if s.count('F') == 0:
        print('No')
    else:
        print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
a, b = [int(i) for i in input().split()]
c = b
while a != b:
    c *= a
    a += 1
print('Positive' if c > 0 else 'Zero' if c == 0 else 'Negative')


Fixed submission:
A, B = map(int, input().split())
if A > 0:
    print("Positive")
elif A <= 0 <= B:
    print("Zero")
else:
    print("Positive" if (B-A+1)%2== 0 else "Negative")
Buggy python submission (verdict: Runtime Error):
S = str(input())
if S == 'ABC':
  return 'ARC'
else:
  return 'ABC'

Fixed submission:
S = str(input())
if S == 'ABC':
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
if S == 'ABC':
  return 'ARC'
else:
  return 'ABC'

Fixed submission:
S = str(input())
if S == 'ABC':
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
if S = 'ABC':
  return 'ARC'
else:
  return 'ABC'

Fixed submission:
S = str(input())
if S == 'ABC':
  print('ARC')
else:
  print('ABC')
Buggy python submission (verdict: Runtime Error):
n ,m = map(int, input().split())
result = set()
first = True
for i in range(m):
    l, r = map(int, input().split())
    tmp = set()
    for i in range(l, r + 1):
        tmp.add(i)
    if first:
        result = tmp
        # print("tmp {}".format(tmp))
        first = False
    else:
        result = result.intersection(tmp)
        # print("result {} tmp {}".format(result, tmp))

print(len(result))

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

if a >= 13:
    print(int(b))
elif a <= 12 and a >= 6:
    print(int(b/2))
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n ,m = map(int, input().split())
result = set()
tmp = set()
first = True
for i in range(m):
    l, r = map(int, input().split())
    tmp = {i for i in range(l, r + 1)}
    if first:
        result = tmp
        first = False
    else:
        result = result.intersection(tmp)

print(len(result))

Fixed submission:
n ,m = map(int, input().split())
L = []
R = []
for i in range(m):
    l, r = map(int, input().split())
    L.append(l)
    R.append(r)
if max(L) <= min(R):
    print(min(R) - max(L) + 1)
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
n ,m = map(int, input().split())
result = set()
first = True
for i in range(m):
    l, r = map(int, input().split())
    tmp = set()
    for i in range(l, r + 1):
        tmp.add(i)
    if first:
        result = tmp
        # print("tmp {}".format(tmp))
        first = False
    else:
        result = result.intersection(tmp)
        # print("result {} tmp {}".format(result, tmp))

print(len(result))

Fixed submission:
n ,m = map(int, input().split())
L = []
R = []
for i in range(m):
    l, r = map(int, input().split())
    L.append(l)
    R.append(r)
if max(L) <= min(R):
    print(min(R) - max(L) + 1)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
n ,m = map(int, input().split())
result = set()
first = True
for i in range(m):
    l, r = map(int, input().split())
    tmp = set()
    for i in range(l, r + 1):
        tmp.add(i)
    if first:
        result = tmp
        # print("tmp {}".format(tmp))
        first = False
    else:
        result = result.intersection(tmp)
        # print("result {} tmp {}".format(result, tmp))

print(len(result))n ,m = map(int, input().split())
result = set()
first = True
for i in range(m):
    l, r = map(int, input().split())
    tmp = set()
    for i in range(l, r + 1):
        tmp.add(i)
    if first:
        result = tmp
        first = False
    else:
        result = result.intersection(tmp)
print(len(result))

Fixed submission:
n ,m = map(int, input().split())
L = []
R = []
for i in range(m):
    l, r = map(int, input().split())
    L.append(l)
    R.append(r)
if max(L) <= min(R):
    print(min(R) - max(L) + 1)
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
n ,m = map(int, input().split())
L_R = []
for i in range(m):
    l, r = map(int, input().split())
    tmp = set()
    for i in range(l, r + 1):
        tmp.add(i)
    L_R.append(tmp)

result = L_R[0]
for target_set in L_R:
    result = result.intersection(target_set)

print(len(result))

Fixed submission:
n ,m = map(int, input().split())
L = []
R = []
for i in range(m):
    l, r = map(int, input().split())
    L.append(l)
    R.append(r)
if max(L) <= min(R):
    print(min(R) - max(L) + 1)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
n=int(input())
string_list=[input() for i in range(n)]
new_list = {}
target_chr = "AB"
count = 0
left_b_count = 0
right_a_count = 0
none_count = 0
for string in string_list:
    if string.count(target_chr) > 0 and (string[0] != "B" or string[-1] != "A"):
        count += string.count(target_chr)
        none_count += 1
        continue
    if string[0] == "B":
        left_b_count +=1
        count += string.count(target_chr)
        none_count += 1
        continue
    if string[-1] == "A":
        right_a_count += 1
        count += string.count(target_chr)
        none_count += 1
        continue

if left_b_count > right_a_count:
    if none_count == n:
        print(count + right_a_count)
    else:
        print(count + right_a_count + 1)
else:
    print(count + left_b_count)

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

print(n - k + 1)

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())

print(n - k + 1)

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

print(n - k + 1)
Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n = map(int,input().split())

result = 0

max_r = n // r

for i in range(max_r + 1):
    max_g = (n - i * r) // g + 1
    for j in range(max_g):
        if i * r + j * g > n:
                continue
        if (n - i * r - j * g ) % b == 0:
            result += 1
print(result)

Fixed submission:
r,g,b,n = map(int,input().split())

result = 0
max_r = n // r

for i in range(max_r + 1):
    max_g = (n - i * r) // g
    for j in range(max_g + 1):
        if (n - i * r - j * g ) % b == 0:
            result += 1
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n = map(int,input().split())

result = 0

max_r = n // r

for i in range(max_r + 1):
    max_g = (n - i * r) // g + 1
    for j in range(max_g):
        max_b = (n - i * r - j * g) // b + 1
        if i * r + j * g > n:
                continue
        for k in range(max_b):
            if i * r + j * g + k * b == n:
                result += 1
print(result)

Fixed submission:
r,g,b,n = map(int,input().split())

result = 0
max_r = n // r

for i in range(max_r + 1):
    max_g = (n - i * r) // g
    for j in range(max_g + 1):
        if (n - i * r - j * g ) % b == 0:
            result += 1
print(result)
Buggy python submission (verdict: Time Limit Exceeded):
import fractions

n = int(input())
A = list(map(int, input().split()))
M = []
for i in range(n):
    target_index = i
    if target_index == 0:
        target = A[1]
    else:
        target = A[0]
    for index, number in enumerate(A):
        if index == target_index:
            continue
        target = fractions.gcd(target, number)
    M.append(target)
print(max(M))

Fixed submission:
from fractions import gcd

n = int(input())
A = list(map(int, input().split()))

L = [0]
for i in range(n):
    L.append(gcd(L[i], A[i]))

R = [0]
for i in range(n-1, -1, -1):
    R.append(gcd(R[(n-1)-i],A[i]))
R.reverse()

M = []

for i in range(n):
    M.append(gcd(L[i],R[i+1]))
    
print(max(M))

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

n = int(input())
A = list(map(int, input().split()))
M = []
for i in range(n):
    target_index = i
    if target_index == 0:
        target = A[1]
    else:
        target = A[0]
    for index, number in enumerate(A):
        if index == target_index:
            continue
        target = math.gcd(target, number)
    M.append(target)
print(max(M))

Fixed submission:
from fractions import gcd

n = int(input())
A = list(map(int, input().split()))

L = [0]
for i in range(n):
    L.append(gcd(L[i], A[i]))

R = [0]
for i in range(n-1, -1, -1):
    R.append(gcd(R[(n-1)-i],A[i]))
R.reverse()

M = []

for i in range(n):
    M.append(gcd(L[i],R[i+1]))
    
print(max(M))
Buggy python submission (verdict: Runtime Error):
import sys
n,k = map(str, input().split())
s = list(str(input()))

zero_count_list = []
zero_count = 0
one_count_list = []
one_count = 0
s_size = len(s)

for index, i in enumerate(s):
    if i == "0":
        zero_count += 1
    else:
        if zero_count != 0:
            zero_count_list.append(zero_count)
        zero_count = 0
    if index == s_size - 1:
        if zero_count != 0:
            zero_count_list.append(zero_count)

for index, i in enumerate(s):
    if i == "1":
        one_count += 1
    else:
        if one_count != 0:
            one_count_list.append(one_count)
        one_count = 0
    if index == s_size - 1:
        if one_count != 0:
            one_count_list.append(one_count)
if k => len(zero_count_list):
    print(s_size)
    sys.exit(0)

Fixed submission:
s = list(input())
first_zero = []
first_one = []
s_size = len(s)
for i in range(s_size):
    if i % 2 == 0:
        first_zero.append("0")
        first_one.append("1")
    else:
        first_zero.append("1")
        first_one.append("0")

count_zero = 0
count_one = 0

for index,number in enumerate(s):
    if number == first_zero[index]:
        pass
    else:
        count_zero += 1

    if number == first_one[index]:
        pass
    else:
        count_one += 1

if count_one > count_zero:
    print(count_zero)
else:
    print(count_one)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
NQ = input().split(" ")
S = str(input())
N = int(NQ[0])
Q = int(NQ[1])
result_list = []
l = 0
r = 0
lr = ""
for i in range(0, Q):
  lr = input().split(" ")
  l = int(lr[0])
  r = int(lr[1])
  subStr_S = str(S[l-1:r]).replace("G", "").replace("T", "")
  result_list.append(subStr_S.count("AC"))

[print(result) for result in result_list]

Fixed submission:
# -*- coding: utf-8 -*-
input_val = str(input())

if input_val == "A":
  print("T")
elif input_val == "T":
  print("A")
elif input_val == "G":
  print("C")
elif input_val == "C":
  print("G")
Buggy python submission (verdict: Time Limit Exceeded):
s = str(input())
ans = 0
while(True):
    if s.find("01") != -1:
        s = s.replace("01","",1)
        ans += 2
    elif s.find("10") != -1:
        s = s.replace("10","",1)        
        ans += 2
    else:
        break

print(ans)

Fixed submission:
s = str(input())
ans = 0
count_zero = s.count("0")
count_one = s.count("1")
ans = min(count_zero, count_one) * 2
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
s = int(input())
progression = []
n = s
count = 1
while n not in progression:
    count += 1
    if n % 2 == 0:
        n = n/2
    else:
        n = 3 * n + 1
        
print(count)

Fixed submission:
s = int(input())
progression = [s]
n = s
count = 1
while True:
    count += 1
    if n % 2 == 0:
        n = n/2
    else:
        n = 3 * n + 1

    if n in progression:
        break
    else:
        progression.append(n)

print(count)
Buggy python submission (verdict: Runtime Error):
d,n = map(int, input().split())

divide = []

if d == 0:
    for i in range(1, 101):
        divide.append(i)
elif d == 1:
    for i in range(100, 10000, 100):
        divide.append(i)
else:
    for i in range(10000, 100000000, 10000):
        divide.append(i)

print(divide[n - 1])

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

divide = []

if d == 0:
    for i in range(1, 100):
        divide.append(i)    
    divide.append(101)
elif d == 1:
    for i in range(100, 10000, 100):
        divide.append(i)
    divide.append(10100)
    
else:
    for i in range(10000, 1000000, 10000):
        divide.append(i)
    divide.append(1010000)
print(divide[n - 1])
Buggy python submission (verdict: Runtime Error):
w = str(input())

w_list = list(w)

str_list = [chr(i) for i in range(97, 97+26)]

count = 0

for i in str_list:
	if w_list.count(str_list[i])%2 == 0:
		count +=1
	else:
		print("NO")
		break

if count == 26:
	print("YES")

Fixed submission:
w = str(input())

w_list = list(w)

str_list = [chr(i) for i in range(97, 97+26)]

count = 0

for char in str_list:
	if w_list.count(char)%2 == 0:
		count +=1
	else:
		print("No")
		break
	if count == 26:
		print("Yes")
Buggy python submission (verdict: Runtime Error):
N, L = map(int, input().split())

char_list= []
for dummy in range(N):
    char_list.append(str(input())

answer = ""
for char in sorted(char_list):
    answer += char

print(answer)

Fixed submission:
N, L = map(int, input().split())

char_list = []

for dummy in range(N):
    S = str(input())
    char_list.append(S)

char_list = sorted(char_list)
answer = ""
for char in char_list:
    answer += char

print(answer)
Buggy python submission (verdict: Runtime Error):
contest = input()

if contest = "ABC":
  print("ARC")
else:
  print("ABC")
  

Fixed submission:
contest = input()

if contest == "ABC":
  print("ARC")
else:
  print("ABC")

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

if(S == "ABC"):
	print("ARC")
elif(S == "ARC"):
	print("ABC")



Fixed submission:
S = input()

if(S == "ABC"):
	print("ARC")
elif(S == "ARC"):
	print("ABC")

Buggy python submission (verdict: Runtime Error):
S = input()

if(S == ABC):
	print("ARC")
elif(S == ARC):
	print("ABC")



Fixed submission:
S = input()

if(S == "ABC"):
	print("ARC")
elif(S == "ARC"):
	print("ABC")

Buggy python submission (verdict: Runtime Error):
if(S == ABC):
	print("ARC")
elif(S == ARC):
	print("ABC")



Fixed submission:
S = input()

if(S == "ABC"):
	print("ARC")
elif(S == "ARC"):
	print("ABC")

Buggy python submission (verdict: Runtime Error):
if(S == ABC){
	print("ARC")
}
else if(S == ARC){
	print("ABC")
}


Fixed submission:
S = input()

if(S == "ABC"):
	print("ARC")
elif(S == "ARC"):
	print("ABC")

Buggy python submission (verdict: Runtime Error):
if(S == ABC){
	print("ARC")
}
else if(S == ARC){
	print("ABC");
}

Fixed submission:
S = input()

if(S == "ABC"):
	print("ARC")
elif(S == "ARC"):
	print("ABC")
Buggy python submission (verdict: Time Limit Exceeded):

cnt = 0
n = int(input())
a = list(map(int, input().split()))

for i in range(0,n-1,2):
    if (i+1 <= n-1) and (a[i]+a[i+1] == 1):
        cnt += 1
    for o in range(i+1,n,2):
        if a[i]+a[o] == o-i:
            cnt += 1
        if (o+1 <= n-1) and (a[i]+a[o+1] == o-i+1):
            cnt += 1
        if a[i+1]+a[o] == o-i-1:
            cnt += 1
        if (o+1 <= n-1) and (a[i+1]+a[o+1] == o-i):
            cnt += 1

print(cnt)

Fixed submission:

from collections import defaultdict

n = int(input())
a = list(map(int, input().split()))
lInfo = defaultdict(int)
rInfo = defaultdict(int)
cnt = 0

for i in range(n):
    lInfo[a[i]+i] += 1
    rInfo[i-a[i]] += 1

for k in lInfo.keys():
    cnt += lInfo[k] * rInfo[k]
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):

cnt = 0
n = int(input())
a = list(map(int, input().split()))

for i in range(0,n-1,1):
    for o in range(i+1,n,2):
        if a[i]+a[o] == o-i:
            cnt += 1
        if (o+1 <= n-1) and (a[i]+a[o+1] == o+1-i):
            cnt += 1

print(cnt)

Fixed submission:

from collections import defaultdict

n = int(input())
a = list(map(int, input().split()))
lInfo = defaultdict(int)
rInfo = defaultdict(int)
cnt = 0

for i in range(n):
    lInfo[a[i]+i] += 1
    rInfo[i-a[i]] += 1

for k in lInfo.keys():
    cnt += lInfo[k] * rInfo[k]
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):

count = 0
n = int(input())
a = list(map(int, input().split()))

for i in range(0,n-1):
    for o in range(1,n,2):
        if a[i]+a[o] == o-i:
            count += 1
        if (o+1 <= n-1) and (a[i]+a[o+1] == o+1-i):
            count += 1

print(count)

Fixed submission:

from collections import defaultdict

n = int(input())
a = list(map(int, input().split()))
lInfo = defaultdict(int)
rInfo = defaultdict(int)
cnt = 0

for i in range(n):
    lInfo[a[i]+i] += 1
    rInfo[i-a[i]] += 1

for k in lInfo.keys():
    cnt += lInfo[k] * rInfo[k]
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):

count = 0
n = int(input())
a = list(map(int, input().split()))

for i in range(0,n-1):
    for o in range(1,n):
        if(a[i] + a[o] == o - i):
            count += 1

print(count)

Fixed submission:

from collections import defaultdict

n = int(input())
a = list(map(int, input().split()))
lInfo = defaultdict(int)
rInfo = defaultdict(int)
cnt = 0

for i in range(n):
    lInfo[a[i]+i] += 1
    rInfo[i-a[i]] += 1

for k in lInfo.keys():
    cnt += lInfo[k] * rInfo[k]
print(cnt)
Buggy python submission (verdict: Runtime Error):
a, b = int(input())

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

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

d = a * b
if d % 2 == 0:
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Runtime Error):
N = int(input())

if (N >= 1) & (N <= 999)
    print('ABC')
else:
    print('ABD')

Fixed submission:
N = int(input())

if (N >= 1) and (N <= 999):
    print('ABC')
else:
    print('ABD')
Buggy python submission (verdict: Runtime Error):
S = input()

A = S.count('a')
B = S.count('b')
C = S.count('c')

if (A == 1) and (B == 1) and (c == 1):
    print('Yes')
else:
    print('No')

Fixed submission:
S = input()

A = S.count('a')
B = S.count('b')
C = S.count('c')

if (A == 1) and (B == 1) and (C == 1):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
A, B, C, D = map(int,input())

ab = A + B
cd = C + D

if ab == cd:
    print('Balanced')
elif ab > cd:
    print('Left')
else:
    print('Right')

Fixed submission:
A, B, C, D = map(int,input().split())

ab = A + B
cd = C + D

if ab == cd:
    print('Balanced')
elif ab > cd:
    print('Left')
else:
    print('Right')
Buggy python submission (verdict: Runtime Error):
j = set('abcdefghijklmnopqrstuvwxyz')
s = set(input())
k = sorted(j - s)

if k != '':
    print(k[0])
else:
    print('None')

Fixed submission:
j = set('abcdefghijklmnopqrstuvwxyz')
s = set(input())
k = sorted(j - s)

if len(k)==0:
    print('None')
else:
    print(k[0])
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = 1
for i in range(1, n+1):
    p *= i

print(p%1000000007)

Fixed submission:
n = int(input())
p = 1
for i in range(1, n+1):
    p = (p%1000000007) * (i%100000007)

print(p%1000000007)
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int,input().split())
cnt = 0
for x in range(0, k+1):
    for y in range(0, k+1):
        for z in range(0, k+1):
            sum = x+y+z
            if sum==s:
                cnt += 1
print(cnt)

Fixed submission:
k, s = map(int,input().split())
cnt = 0
for x in range(0, k+1):
    for y in range(0, k+1):
        if (0 <= s-x-y) and (s-x-y <= k):
            cnt += 1
print(cnt)