peterverebics/CodeNet_Python_118 huggingface dataset:
N = input()
l = list(N)
if(l[0]==l[1]):
    if(l[1]==l[2]):
        print("NO")
else:
    print("YES")
def main():
    S = input()
    if "AAA" in S  == True or "BBB" in S == True:
        print("No")
    else:
        print("Yes")
main()
S = input()
if S[0] == S[1] == S[2]:
    print("Yes") 
else:
    print("No")
import sys
s = sys.stdin.readline()
if s == 'AAA' or s == 'BBB':
  print('No')
else:
  print('Yes')
def fun():
    cin=str(input())
    if cin[1] == cin[2] and cin[0] == cin[1]:
        return False
    else:
        return True
fun()
S=input()
S=[1 if s=='A' else 0 for s in S]
print("Yes") if sum(S)==0 or sum(S)==3 else print("No")
a = input()
if a == "BBB" or a == "AAA":
  print("Yes")
else:
  print("No")
S = input()

if S == "AAA" or S == "BBB":
    print("NO");

if S != "AAA" or S != "BBB":
    print("YES");
s=input()
if s=="AAA" or s=="BBB":
    print("Yes\n")
else:
    print("No\n")
word = input()

if word[0:0] == word[1:1] and word[0:0] == word[2:2] :
    print("No")
    
else : print("Yes")
S = input()
if (S=="ABA")or(S=="BAB"):
  print("Yes")
else:
  print("No")
S=input()
for s in S:
    if s==S[0]:
        flg=0
    else:
        print("yes")
        break
if flg == 0:
    print("No")
S = input()

if "AA" in S or "BB" in S:
    print("No")
else:
    print("Yes")
S = str(input())

if S == 'AAA' or 'BBB':
    print('No')
else:
    print('Yes')
S = input().split()

if "A" in S and "B" in S:
    print("Yes")
else: 
    print("No")
s = input()
if s == 'AAA' or 'BBB':
	print("No")
else:
	print('Yes')
s = input()
for i in range(0,2):
    if s[i] != s[i+1]:
        print('YES')
        break
else:
    print('NO')
S=input()

if S[0] == S[1] == S[2]:
    print('Yes')
else :
    print('No')
s = input()
for i in s:
  if "A" not in  i:
    print("No")
  elif "B" not in i:
    print("No")
else:
  print("Yes")
s = input()

a = s.count("a")
b = s.count("b")

if a * b == 0:
    print("No")
else:
    print("Yes")
L=list(input())
print("No" if L.count("A")==0 and L.count("B")==0 else "Yes")
S = input()

print('Yes' if S != 'AAA' or S != 'BBB' else 'No')
s = input()
a = s.count('A')
b = s.count('B')

if(a==3):
    print('Yes')
elif(b==3):
    print('Yes')
else:
    print('No')
import sys

if len(sys.argv) < 2: 
    print("No argument given!")
    exit(0)

string = sys.argv[1]
if string == "AAA": print("No")
elif string == "BBB": print("No")
else: print("Yes")
S=input()

if S[0]==S[1] or S[1]==S[2]:
  print("NO")
else:
  print("Yes")
# -*- coding: utf-8 -*-
a = str(input())

if a.find("AB") != 0 :
	print("Yes")
else:
	print("No")
s = input()

if s == 'AAA' or 'BBB':
  print('No')
else:
  print('Yes')
s = input("station:")
judge = ""
count = 0
result = ""
sta = [s[0], s[1], s[2]]
print(sta)
for s in sta:
    if count == 0:
        judge = s
        
    else:
        if s == judge:
            result = "No"
        else:
            result = "Yes"
            
    count = 1
print(result)
#akash mandal: jalpaiguri government engineering college
#take a look on special cases: test cases

def ii(): return int(input())
def mii(): return map(int,input().split())
def lmii(): return list(mii())


def main():
    s=input()
    if(len(set(list(s)))==1):
        print("NO")
    else:
        print("YES")
        
        
                
        
        
        
if __name__=="__main__": 
    main()
inp=input()
if inp=='AAA'or inp=='BBB':
  print('Yes')
else:
  print('NO')
s = input()
if s[0] == s[1] and s[1] == s[2]:
    print('Yes')
else:
    print('No')
s = input()

if s == "AAA" or "BBB":
    print("NO")
else:
    print("Yes")
print(('Yes', 'No')[input() in 'AAA' + 'BBB'])
S = input()

if S ==  'AAA' or S == 'BBB':
    print('NO')
else:
    print('YES')
S=input()
if S!="AAA" or "BBB":
    print("Yes")
else:
    print("No")
S=input()
if (S!="AAA") or (S!="BBB"):
    print("Yes")
else:
    print("No")
def main():
    s = input()
    if s != "AAA" or s != "BBB":
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
S = input()
if S == "AAA" or S == "BBB":
    print("Yes")
else:
    print("No")
A = str(input())

if A=="AAA"or"BBB":
  print("NO")
  

else:
  print("YES")
def judge(S):
    if (S[1]==S[2] and S[1]==S[3]):
        print('No')
    else:
        print('Yes')
S = list(input())

if "AAA" in S or "BBB" in S:
    print("No")
else:
    print("Yes")
str = input()
str_list = list(str)
 
if str_list[0] == str_list[2]:
  print("Yes")
else:
  print("No")
s = input()

a = s[0]
for i in range(1, 3) :
  if(s[i] != a) :
    print("YES")
    exit()
print("NO")
s = str(input())
if s is "AAA" or s is "BBB":
  print("No")
else:
  print("No")
def station_bus(s1):
  countA=0
  countB=0
  for i in range(len(s1)):
    if s1[i]=="A":
      countA+=1
    else:
      countB+=1
  c1 = countA==1 or countA==2
  c2 = countB==1 or countB==2
  if c1 and c2:
    return True
  else:
    return False




string=input()
output=station_bus(string)
print(output)
s = input()
if s[0] == s[1] and s[0] == s[2]:
  print("Yes")
else:
  print("No")
S = input()
if S[0] == S[1] or S[1] == S[2]:
  print('No')
else: print('Yes')
s = set(list(input()))
if s == 1:
  print("No")
else:
  print("Yes")
S = input()
if S != 'AAA' or 'BBB':
    print('Yes')
else:
    print('No')
s=input()

for i in range(0,2):
    if s[i]!=s[i+1]:
        X=True
        break
    else :
        X=None

print(X)
import sys

X = sys.stdin.readline().rstrip()
if len(set(X)) == 0:
    print('No')
else:
    print('Yes')
S=str(input())
if S.count('A')>0 and S.count('B')>0:
    print('Yse')
else:
  print('No')
s=list(input().strip())
x=s.count(s[0])
if x==0 or x==3:
    print('NO')
else:
    print('YES')
s = input()

if s == 'AAA' or 'BBB':
	print('No')

else:
	print('Yes')
A = input()
if A == "AAA" and A == "BBB":
  print("No")
else:
  print("Yes")
S=input()
B,A=0,0
for i in range(3):
    if S[i]=="A":
        A+=1
    else:
        B+=1
print("Yes" if A==2 or B==2 else "NO")
S=input()
a=S[0]
flag=0
for i in range(3):
  if (S[0]!=S[i]):
    fgag=1
if (flag==0):
  print('No')
else:
  print('Yes')
s = input()
if s[0] == s[1] and s[1] == [2]:
	print('No')
else:
	print('Yes')
s=input().split()
if len(set(s))==1:
  print("No")
else:
  print("Yes")
s=input()
if s=="AAA" or s=="BBB":
  print('Yes')
else:
  print('No')
print("No" if input() == "AAA" or "BBB" else "Yes")
s=input()
l=set(s)
if(len(s)==1):
    print("No")
else:
    print("Yes")
lit = str(input())
print("Yes" if "A" in lit and "B" in lit else "B")
s = input().split()

if s == "AAB" or s == "ABA" or s == "BAA" or s == "BBA" or s == "BAB" or s == "ABB":
  	print("No")
else:
  	print("Yes")
# coding: utf-8
 
 
def main():
 
    in_data = input()
 
    if (in_data == 'AAA' or
        in_data == 'BBB'):
        print('NO')
    else:
        print('YES')
 
    return 0
  
  
if __name__ == '__main__':
    main()
A = set(input().split())
if len(A) == 1:
    print("No")
else:
    print("Yes")
S = input()

if S == "AAAA" or S == "BBB":
    print("Yes")
else:
    print("No")
S=input()


if S[0]==S[1]==S[2]:
    print('NO')
else:
    print('Yes')
s=input()
if s=="AAA" and "BBB":
  print("No")
else:
  print("Yes")
S = list(input())
if set(S) == 1:
  print("No")
else:
  print("Yes")
S=input()

if S=="AAA" or S=="BBB":
  print("NO")
else:
  print("Yes")
str1 = str(input())
if str1 == 'AAA' or str1 == 'BBB':
	print('YES')
else:
	print('NO')
s = input()
if s == 'AAA' or s == "BBB":
    print("NO")
else:
    print('YES')
s = input()
if s == "AAA" and "BBB":
  print("No")
else:
  print("Yes")
a = input()
if a == "AAA" or "BBB":
  print("yes")
else:
  print("NO")
value = input()
if value == "AAA" or "BBB" or "ABB" or "BAA":
  print("No")
else:
  print("Yes")
S = input()
 
if S == 'AAA' or 'BBB':
    print('No')
else:
    print('Yes')
s = input()

if "A" and "B" not in s:
	print("No")

else:
    print("Yes")
s = input()
if s == 'aaa' or s == 'bbb':
    print('No')
else:
    print('Yes')
word = input()

x = 0

if word[1:1] != word[2:2] :
  x = x+1
  
if word[2:2] != word[0:0] :
  x = x+1
  
if word[0:0] != word[1:1] :
  x = x+1
  
if x == 0 : print("Yes")
else : print("No")
Flag =  0 
S = input()
SA = [str(c) for c in S]
A = list(['A','A','A'])
B = list(['B','B','B'])
print(SA)
if(set(SA) == set(A) and set(SA) ==set(B)):
    print("No")
else:
    print("Yes")
"""
rami dior ball.
working on atcoder beginner contest 158
"""

s = input("")
s = list(s)

if s[0] != s[1] or s[1] != s[2]:
    print("YES")
else:
    print("NO")
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
S = readline().decode().split()
if 'A' in S and 'B' in S:
    print('Yes')
else:
    print('No')
S = input('input number')
if S[0] == S[1] and S[1] == S[2]:
  print('No')
else:
  print('Yes')
a=list(input())
if a[0]==a[1]==a[2]:
	print('no')
else:
    print('yes')
s = input()

if 'A' in s and 'B' in s:
  print('Yes')
else:
  print('NO')
S = input()
if S != "AAA" or "BBB":
    print("Yes")
else:
    print("No")
x = input()
if x in "A" and "B":
  print("No")
else:
  print("Yes")
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)
MOD = 10 ** 9 + 7

S = list(input())

if 1 == len(set(S)):
    print ('No')
else:
    print ('Yes')
s=input()
if s=='AAA' and 'BBB':
    print('No')
else:
    print('Yes')
N = input()
l = list(N)
if(l[0]==l[1]):
    if(l[1]==l[2]):
        print("No")
else:
    print("Yes")
if "a" and "b" in input():
    print("yes")
else:
    print("no")
s = input()
As = s.count("A")
Bs = s.count("B")
if As == 3 or Bs == 3:
  print("NO")
else:
  print("YES")
s = input()
if s=="AAA" or "BBB":
  print("No")
else:
  print("Yes")
s = input()

if ( s == 'AAA' or s == "BBB" ) :
    print("NO")
else :
    print("YES")
n=input()
x=n.count("A")
y=n.count("B")
if(x!=0 and  y!=0):
	print("YES")
else:
	print("NO")
s = input()
if s == "BBB":
	print("NO")
elif s == "AAA":
	print("NO")
else:
	print("YES")
s = input("")
s = list(s)

if s[0] != s[1] or s[1] != s[2]:
    print("YES")
else:
    print("NO")
S = input()
if((S[0] == S[1])and(S[1] == S[2])):
  print('Yes')
else:
  print('No')
n=input()
if n=="AAA" or "BBB":
  print("No")
else:
  print("Yes")
S = input()

if S.count("A") == 3 or S.count("B") == 3:
  print("Yes")
else:
  print("No")
s = input()
if s == 'AAA' or s == 'BBB':
    print('Yes')
else:
    print('No')
S=input()
if(("A"and"B")in S):
  print("Yes")
else:
  print("No")
s = input().split(' ')
s = set(s)
if len(s) == 1:
    print("No")
else:
    print("Yes")
#--------------------------------------------
#ライブラリ呼び出し
import sys
import math
from math import sqrt
input = sys.stdin.readline
#--------------------------------------------
N = str(input())
print('No') if N == "AAA" or N == "BBB"  else print('Yes')
a = input()
c = 'No'
for i in range(2):
  if a[i] == a[i+1]:
    c = 'Yes'
    break
print(c)
s=input()
if s=="BBB":
    print("No")
else:
    print("Yes")
word = input().split()

a = 0
i = 0

for i in range(3) :
    j = i + 1
    if word[i:i] == word[j:j] :
        a = a + 1

if a == 0 : print("No")
else : print("Yes")
S = input()
if S == 'AAA' or 'BBB':
  print('No')
else:
  print('Yes')
S=input()
a=[]
b=[]
for i in range(3):
  if S[i]=="A":
    a+=[S[i]]
  else:
    b+=["B"]
if len(a)==3 or len(b)==3:
  print("Yes")
else:
  print("No")
import sys
Flag =  0 
S = input()
SA = [str(c) for c in S]
A = list(['A','A','A'])
B = list(['B','B','B'])
print(SA)
if(set(S) == set(A) and set(S) ==set(B)):
    print("No")
else:
    print("Yes")
s = input()
if s[0] == s[1] or s[1] == s[2]:
  print('No')
else: print('Yes')
s=input()
if 'A' in s:
	if 'B' not in s:
		print('Yes')
	else:
		print('Yes')
else:
	print('No')
# -*- coding: utf-8 -*-

import sys

def prob_a(args):
    s = args[1]
    chars = list(s)
    tmpc = chars[0]
    for c in chars[1:]:
        if c == tmpc:
            continue
        else:
            print('Yes')
            return 0
    print('No')

if __name__ == '__main__':
    args = input()
    prob_a(args)
S = input()
if S == 'AAA' and S == 'BBB':
  print('No')
else:
  print('No')
s = input().split()
if s == "AAA" or s == "BBB":
  print("No")
else:
  print("Yes")
AB = input()
if AB == "AAA" or AB == "BBB":
  print("No")
else:
  print("yes")
s = str(input())

print("No") if s=="AAA" or s=="BBB" else print("No")
a = input()
if a == 'AAA' or 'BBB':
  print('No')
else:
  print('Yes')
s = input()
if "A" in s and "B" in s:
  print("YES")
else:
  print("NO")
s=input()
if s=='AAA':
  print('No')
if s=='BBB':
  print('No')
else:
  print('Yes')
S = list(input())
if S.count('A') == 3 or S.count('A') == 0:
    print('Yes')
else:
    print('No')
S =list(input())
if S[0]!=S[1]:
    print("Yes")
elif S[1]==S[2]:
    print("No")
S = input()

if S == "AAA" or S == "BBB":
    print("NO")

if S != "AAA" or S != "BBB":
    print("YES")
s=input()
if s=='AAA' or s=='BBB':
  print ('No')
else:
  ('Yes')
s = input().split()
n = 0
for i in range(len(s) - 1):
  if s[i] != s[i + 1]:
    n += 1
if n == 0:
  print('No')
else:
  print('Yes')
S = input()

L = [S[i] for i in range(3)]

T = "No"
for i in range(3):
  if S[i] not in L:
    T = "Yes"
print(T)
def InS(): return input()


def InL(): return list(map(int, input().split()))


def InI(): return int(input())


S = input()

S_list = list(S)


if S_list[0] == S_list[1]:
    if S_list[1] == S_list[2]:
        print("Yes")
    else:
        print("No")
else:
    print("No")
S = input()
if S[0] == S[2] and not S[0] == S[1]:
    print('Yes')
else:
    print('No')
x=input()

if x=='AAA' or x=='BBB':
    print('Yes')
else :
    print('No')
railway_companies = ['A', 'B']
services = []

for i in railway_companies:
    for j in railway_companies:
        for k in railway_companies:
            services.append(str(i) + str(j) + str(k))

def check_service(service):
    no_service = ['AAA', 'BBB']
    if service in no_service:
        return "No"
    return "Yes"

print(services)
for i in services:
    print(check_service(i))
s = input("station:")
judge = ""
count = 0
result = ""
sta = [s[0], s[1], s[2]]
print(sta)
for s in sta:
    if count == 0:
        judge = s
    else:
        if s == judge:
            result = "No"
        else:
            result = "Yes"
            break
            
    count = 1
print(result)
S = input()

if (len(set(S)) != 0):
    print('Yes')
else:
    print('No')
A = set(list(input()))
print(A)
if len(A) == 1:
    print("No")
else:
    print("Yes")
S=input()
if S=="AAA" or "BBB":
  print("No")
else:
  print("Yes")
s = input()
if s[0] == s[1] and s[1] == s[2]:
    print("Yes")
else:
    print("No")
s = input()
flag = 0

print(s)
for i in range(3):
    for j in range(3):
        if s[i] != s[j]:
            flag =1

if flag ==1 :
    print("Yes")
else:
    print("No")
S = input()

if S[0] != S[1] and S[1] != S[2]:
    print('Yes')
else:
    print('No')
import sys
input = sys.stdin.readline
s=input().rstrip()
for i in range(2):
    if s[i]!=s[i+1]:
        print('YES')
        break
else:
    print('NO')
status = input()
if 'AB' in status or 'BA' in status:
    print('Yes')
else:
    print('no')
S=input();
x=S.find("AB")+S.find("BA")
print("Yes" if x>0 else "No")
s=input()
if "A" and "B" in s:
  print("Yes")
else:
  print("No")
stations = input()
if (not "A" in stations) or ("B" in stations):
  print("No")
else:
  print("Yes")
s = list(input())

if s.count('A') > 0 and s.count('B') > 0:
  print('YES')
else:
  print('No')
s = input()

if("A" not in s):
    print("No")
else:
    print("Yes")
s = input()
if s.count('A') ==1 or s.count('B') ==3:
    print('No')
else:
    print('Yes')
s = input()

if(s=="BBB"):
    print("No")
else:
    print("Yes")
s = input()
if s[0]==s[1] or s[1] ==s[2]:
  print('YES')
else:
  print('NO')
S=input()
if S=="AAA" or S=="BBB":
    print("No")
else:
    print("No")
s = input()
if s == "AAA" or s == "BBB":
    print("no")
else:
    print("yes")
import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    S_ = S()
    if S_ == 'AAA' or 'BBB':
        print('No')
    else:
        print('Yes')

if __name__ == "__main__":
    main()
S = list(input())
if len(set(S))==2 :
    print('Yse')
else:
    print('No')
S = str(input())

c = S[0]
d = S[1]
e = S[2]

print(c + d + e)

if c == d == e:
    print("No")
else:
    print("Yes")
S = input()

if S == 'AAA' or 'BBB':
    print('No')
else:
    print('Yes')
import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
import sys
import random
import time
inf = 10**9


def main():
    s = input()
    if s == 'AAA' or 'BBB':
        print("Yes")
    else:
        print('No')


if __name__ == '__main__':
    main()
s = input()

if (s[0]==s[1] and s[1]==s[2]):
    print("NO")
else:
    print("YES")
print(('Yes', 'No')[input() in ('AAA' + 'BBB')])
if __name__ == '__main__':
    s = input()
    print('Yes' if s == 'AAA' or s == 'BBB' else 'No')
s=input()
a=0
b=0
for i in s:
  if i=="A":
    a+=1
  elif i=="B":
    b+=1
if (a+b)!=3 and (a==0 or b==0):
  print("No")
else:
  print("Yes")
t = input()
l = [i for i in t]
print(l)
if "A" in l and "B" in l:
    print("Yes")
else:
    print("No")
s = input()
if s == 'AAA' or 'BBB':
    ans = 'Yes'
else:
    ans = 'No'
print(ans)
S=input()
if S in 'A' and S in 'B':
    print('Yes')
else:
    print('No')
if len(set(input()))==1:
       print("NO")
else:
       print("YES")
s=input()
if s[0]==s[1] and s[0]==s[1]:
    print("No")
else:
    print("Yes")
s = str(input())
if s is "AAA" or s is "BBB" or s is "ABA" or s is "BAB":
  print("No")
else:
  print("Yes")
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

S = str(input())
if S == "AAA" or S == "BBB":
    print("Yes")
else:
    print("No")
list=input()
if list[0]==list[1]==list[2]:
         print("Yes")
else:
        print("No")
import sys
range = xrange
input = raw_input

S = input()
if all(c == 'B' for c in S):
    print 'No'
else:
    print 'Yes'
n=input()
if len(set(n))>2:
  print("Yes")
else:
  print("No")
# -*- coding: utf-8 -*-
a = str(input())

if a in "AB" or a in "BA":
	print("Yes")
else:
	print("No")
s = input()

if s[0] == s[1] == s[2]:
    print("Yes")
else:
    print("No")
S=input()
count=0
for i in range(2):
  S[i]==S[i+1]
  count+=1
if count==2:
  print("No")
else:
  print("Yes")
S = input()
tList = list(S)

firstStation = tList[0]
Monopoly = 0

for str in tList:
    if(str == firstStation):
        Monopoly = 0

    else:
        Monopoly = 1
        break

if(Monopoly == 0):
    print('NO')
else:
    print('YES')
s = input()

if "A" and "B" not in s:
	print("NO")

else:
    print("YESA")
s = list(input())
ans = len(str(s))

if ans > 0:
  print("Yes")
else:
  print("No")
a=input()
if  a == "AAA" or a == "BBB":
	print("No")
else:
	print("yes")
S=map(str,input())
if "A" in S or "B"in S:
    print("Yes")
else :
    print("No")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    s = input().strip()
    if s == "aaa" or s == "bbb":
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
m=input()
m2=[m[:1],m[1:2],m[2:]]

if 'A' and 'B' in m2:
  print('Yes')
  
else:
  print('No')
S = input()
if "A" in S and "B" in S:
    print("yes")
else:
    print("no")
import sys
def input():
    return sys.stdin.readline()[:-1]

S = input()
if not S=='AAA' or S=='BBB':
    print('Yes')
else:
    print('No')
s = str(input())
if s is "AAA":
  print("No")
elif s is "BBB":
  print("No")
else:
  print("Yes")
S=input()
if (S[0]==S[1]) and (S[1]==S[2]):
  print("NO")
else:
  print("Yes")
import sys
a = sys.argv
if a == "aaa" or a == "bbb":
    print("No")
else:
    print("Yes")
s = input()
q = 0
for i in range(2):
  if q != 0:
    print('Yes')
    exit()
  if s[2] != i:
    q += 1
    
print('No')
s = input()
l = list(s)
for i in range(0,len(l)-1):
  if(l[i]!= l[i+1]):
    print("Yes")
    break
  else:
    print("No")
s = str(input())
if s == 'AAA' or s == 'BBB':
    print('No')
print('Yes')
a=input()
if a=="AAA" or "BBB":
  print("No")
else:
  print("Yes")
S = input()
if S[0] == S[2] and S[0] != S[1]:
    print('Yes')
else:
    print('No')
S = input()

print('No' if S == 'AAA' or 'BBB' else 'Yes')
unkoujyokyo=input()
if unkoujyokyo == 'AAA':
  print('Yes')
elif unkoujyokyo == 'BBB':
  print('Yes')
else:
  print('No')
S = input()

if len(set(list(S))) == 1:
    print('Yes')
else:
    print('No')
s = input()

a = s[0]
for i in range(1, 3) :
  print(s[i])
  if(s[i] != a) :
    print("Yes")
    exit()
print("No")
S = input().split()
if len(S)==3 and S.count('A')==2 or S.count('B')==2:
    print('Yes')
else:
    print('No')
S = input()
A = 0
B = 0
for i in S:
    if i == A:
        A+=1
    elif i == "B":
        B += 1

if A == 3 or B == 3:
    print("No")
else:
    print("Yes")
n, b, r = map(int, input().split())

if b == 0:
    print(0)
elif r == 0:
    print(n)
else:
    k = n // (b + r)
    q = n % (b + r)
    print(b * k + min(q, b))
n,a,b=map(int,input().split())
if a==0:
  print("0")
  exit()
tmp1 = n // (a+b)
tmp2 = n-(tmp1*(a+b))
if tmp2 >= a:
  print((tmp1*a)+a)
else:
  print((tmp1*a)+tmp2)
List = list(map(int, input().split()))

Set0 = List[0]//(List[1]+List[2])
E = List[0] - (List[1]+List[2])*Set0

if E >= List[1]:
    Blue = Set0 * List[1] + List[1]
else:
    Blue = Set0 * List[1] + E

print(Blue)
n,a,b=map(int,input().split())
m=n//(a+b)
c=n-m*(a+b)
if c<=a:
  print(m*a+c)
else:
  print(m*a+a)
n,a,b = map(int,input().split())
if a == 0:
    print(0)
else:
    print((n // min(n,a+b) * min(n,a)) + min(a,(n % min(n,(a+b)))))
# -*- coding: utf-8 -*-

# スペース区切りの文字列の入力
st = input().split()
#商
div = int(st[0]) // (int(st[1]) + int(st[2]))
#余り
rem = int(st[0]) % (int(st[1]) + int(st[2]))

if(rem < int(st[1])):
  print(div * int(st[1]) + rem)
else:
  print(div * int(st[1]) + int(st[1]))
n, a, b = map(int, input().split())

q = n // (a + b)

x = a * q

w = n % (a + b)
if w >= a:
    y = a
else:
    y = w

ans = x + y

print(ans)
n,a,b=map(int,input().split())
ans = n // (a + b) * a
rem = n % (a + b)
ans+=min(a,rem)
print(ans)
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N, A, B = read_int()

def solve():
    ans = (N // (A + B)) * A
    r = (N % (A + B))
    ans += r if r < A else A
    return ans

if __name__ == "__main__":
    print(solve())
import math
x = input().split()
n = int(x[0])
a = int(x[1])
b = int(x[2])
z = 0
z = math.floor(n / (a+b)) * a
amari = math.floor(n % (a+b))
if amari == 0:
  pass
elif amari <= a:
  z += amari
else:
  z += a
print(z)
N, A, B = map(int, input().split())

ret = (N // (A + B)) * A
ret += min(A, N % (A + B))

print(ret)
n,a,b= list(map(int, input().strip().split()))
k=int(n/(a+b))
if n-k*(a+b)>=a:
  print((k+1)*a)
else:
  print(n-k*b)
n, a, b = map(int, input().split())
c = a + b
if n % c == 0:
    ans = a * (n // c)
elif n % c <= a:
    ans = a * (n // c) + n % c
else:
    ans = a * (n // c +1)

print(ans)
n,a,b = input().split()
n,a,b = [int(n), int(a), int(b)]
num = n // (a + b)
ber = n % (a + b)
ans = a * num

if ber > a:
  ans += a
else:
  ans += ber
  
print(ans)
n, a, b = map(int, input().split())
q = n // (a + b)
r = n % (a + b)

print(q*a + min(r, a))
n,a,b=map(int,input().split())

count=0
m=n//(a+b)
l=n%(a+b)

if l==0:
    print(m*a)
elif l>a:
    print(m*a+a)
else:
    print(m*a+l%a)
n,a,b=map(int,input().split())
print(a*(n//(a+b))+min(a,n%(a+b)))
n, a, b = map(int, input().split())

temp = n // (a + b)
amari = n % (a + b)

if amari > a:
    print((temp + 1) * a)
else:
    print(temp * a + amari)
n,a,b=map(int,input().split())
c=(n//(a+b))*a
r=n%(a+b)
if r<=a:
  print(c+r)
else:
  print(c+a)