Harryxun/stf_run huggingface dataset:
N, A, B = map(int,input().split())
t = N*A
if t > B:
  print(B)
elif t < B:
  print(t)
elif t = B:
  print(B)


### FIXED CODE ###

N, A, B = map(int,input().split())
t = N*A
if t > B:
  print(B)
else:
  print(t)
# -*- coding: utf-8 -*-
while True:
    try:
        ls = []
        dic = {}# {'your' : [appeared,len]}
        
        ls = raw_input().split()
        for k in range(len(ls)):
            if ls[k] not in dic.keys():
                dic[ls[k]] = []
                dic[ls[k]].append(1)
                dic[ls[k]].append(len(ls[k]))
            else:
                dic[ls[k]][0] += 1
        
        a=max(dic) # value[0]
        b=max(dic.items(), key=lambda x: x[1][1])[0]
        print "%s %s" % (a,b)
    except EOFError:
        break

### FIXED CODE ###


wordlist = []
wordlist = raw_input().split()
dic = {}       
longest = ['',0]  
m = 0
for word in wordlist:    
    # mode
    if word not in dic:
        dic[word] = 1
    else:
        dic[word] += 1
    
    # word_length    
    if m == 0:
        longest[0] = word
        longest[1] = len(word)
        m += 1
    else:
        if len(word) > longest[1]:
            longest[0] = word
            longest[1] = len(word)

mode_key = sorted(dic.items(),key = lambda x:x[1],reverse=True)[0][0]                   
print '%s %s' % (mode_key,longest[0])
<?php
fscanf(STDIN,"%d%d",$a,$b);
if (($a+$b)%2==0){
    print ($a+$b)/2;
}else{
    print("IMPOSSIBLE");
}
?>


### FIXED CODE ###

a,b=map(int,input().split())
k=(a+b)//2
if abs(a-k)==abs(b-k):
    print(k)
else:
    print("IMPOSSIBLE")
r, d, x = (int(i) for i in input().split())

for i in range(10):
  x = r * x - d
  print(x)



### FIXED CODE ###

a, b = (int(i) for i in input().split())
res =0
if a>=13 :
  res = b
elif a<=5:
  res = 0
else:
  res = int(b/2)
print(res)
(a,b)=map(int, raw_input().split())
if a<b:
    print "a < b"
else if a>b:
    print "a > b"
else:
    print "a == b"

### FIXED CODE ###

(a,b)=map(int, raw_input().split())
if a<b:
    print "a < b"
if a>b:
    print "a > b"
if a==b:
    print "a == b"
import sys
import math
input = sys.stdin.readline

A, B = map(int, input().split())

n = math.gcd(A, B)
if n == 1:
    print(1)
    sys.exit()


def make_divisors(n):
    divisors = set()
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.add(i)
            if i != n // i:
                divisors.add(n//i)

    # divisors.sort()
    return divisors


def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    prime = [2]
    limit = int(n**0.5)
    data = [i + 1 for i in range(2, n, 2)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]


d = make_divisors(n)
p = set(get_sieve_of_eratosthenes(n))

print(len(d & p) + 1)


### FIXED CODE ###

import sys
import fractions
input = sys.stdin.readline

A, B = map(int, input().split())

n = fractions.gcd(A, B)
if n == 1:
    print(1)
    sys.exit()


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


a = {x[0] for x in factorization(A)}
b = {x[0] for x in factorization(B)}

print(len(a & b) + 1)
# -*- coding: utf-8 -*-

def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

N = int(input())
A = [int(a) for a in input().split()]

if N <= 2:
    print(max(A))
    exit()

gc = [0] * (N-1)
for i in range(0,N-1):
    gc[i] = gcd(A[i],A[i+1])
#print(gc)
# このgcで最小のものが算出されるところを書き換えればよい？
# 連続してれば共通部、連続してないなら端とか？

mnd = -1
mn = 1e10
for i in range(0, N-1):
    if mn >= gc[i]:
        mnd = i
        mn = gc[i]

if mnd == N-1 and gc[-1] < gc[-2]:
    mnd = N-1

# 連続してれば後者になるのでmndはA[i]に対応することになる
# gcの長さはN-1

B = [a for a in A if a != A[mnd]]
#print(B)

lb = len(B)
if lb >= 2:
    g = B[0]
    for i in range(1, len(B)):
        g = gcd(g, B[i])
else:
    g = B[0]
print(g)


### FIXED CODE ###

# -*- coding: utf-8 -*-

def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

N = int(input())
A = [int(a) for a in input().split()]

# GCDの結合則を利用する
# 左端、右端からの累積GCDを求めておくと、Aiを取り除いた場合のGCDがすぐに計算できる。
# つまり、
# L(i): n=0,...,iまでのGCD 
# R(i): n=i,...,N-1までのGCD
# このとき、Aiを除いた全体のGCDは、GCD(L(i-1), R(i+1))で計算できる。

L = [0] * N
R = [0] * N

L[0] = A[0]
R[-1] = A[-1]
for i in range(1, N):
    L[i] = gcd(L[i-1], A[i])
    idx = N-1-i
    R[idx] = gcd(R[idx+1], A[idx])

mx = 0
for i in range(N):
    if i == N-1:
        v = L[N-2]
    elif i == 0:
        v = R[1]
    else:
        v = gcd(R[i+1], L[i-1])
    mx = max(v, mx)
print(mx)
import numpy as np

N=int(input())
Rain = np.array(list(map(int,input().split())))
Rain = np.reshape(Rain,(N,1))

n1 = np.ones(N)
n2 = np.ones(N-1)
a = np.diag(n1)
b = np.diag(n2,k=1)
c = a+b
c[N-1][0] = 1
d = 0.5 * c

ans = np.linalg.solve(d,Rain)
print('u')
#for i in ans:
#    print(int(i[0]),end=' ')

### FIXED CODE ###

N=int(input())
a = list(map(int,input().split()))
S = sum(a)
S1 = 0
for i in range(N):
    if i%2 == 1:
        S1 += a[i]
b = [0 for i in range(N)]
b[0] = S - 2*S1
print(b[0],end=' ')
for j in range(1,N):
    b[j] = 2*a[j-1] - b[j-1]
    print(b[j],end=' ')
input()
ans = 'ABC' if s == 'ARC' else 'ARC'
print(ans)


### FIXED CODE ###

s = input()
ans = 'ABC' if s == 'ARC' else 'ARC'
print(ans)
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)

def f(x):
    memo = {}
    if x == 0:
        return True
    elif x < 0:
        return False
    for j in range(1,x+1)
        if j in memo.keys():
        	return f(memo[j])
    	for i in range(6):
        	if f(j-100-i):
            	memo[j] = True

    return memo[x]

def main():
    X = int(input())
    print(int(f(X)))

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3

def solve(x):
    if x >= 2000:
        return True
    memo = [True] + [False]*x

    def dp(k):
        if k == 0:
            return True
        for i in range(100,106):
            if k-i >= 0 and memo[k-i]:
                return True
        
        return False
    
    for i in range(x):
        memo[i+1] = dp(i+1)
    return memo[x]



def main():
    X = int(input())
    print(int(solve(X)))
    return

if __name__ == '__main__':
    main()
import itertools

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

    num = 10*100
    nums = [num + i for i in range(0, n+1)]

    sums = []
    for i in range(k, n+2):
        for v in itertools.combinations(nums, i):
            sums.append(v)

    totals = []
    for s in sums:
        totals.append(sum(s))

    totals = set(totals)
    print(len(totals))

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n, k = map(int, input().split())

    num = 10*100
    nums = [num + i for i in range(0, n+1)]

    # sums = []
    total = 0
    for i in range(k, n+2):
        _min = int((nums[0]+nums[i-1])*(nums[i-1]-nums[0]+1)/2)
        _max = int((nums[-i]+nums[-1])*(nums[-1]-nums[-i]+1)/2)

        total += _max - _min + 1

    print(total%(10**9+7))

if __name__ == "__main__":
    main()
from sys import stdin
import fractions

N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]

lcm_a = int(A[0] * A[1] / fractions.gcd(A[0], A[1]))

if len(A) > 2:
    for k in A[2:]:
        lcm_a = int(lcm_a * k / fractions.gcd(lcm_a, k))

modulo_sum = 0

for k in A:
    modulo_sum += (lcm_a - 1) % k

print(modulo_sum)

### FIXED CODE ###

from sys import stdin

N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]

lcm_a = A[0] * A[1]

if len(A) > 2:
    for k in A[2:]:
        lcm_a = lcm_a * k

modulo_sum = 0

for k in A:
    modulo_sum += (lcm_a - 1) % k

print(modulo_sum)
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
import fractions
from functools import reduce

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
li = rl()
ans = 1
for i in range(n):
  lii = li[i]
  a = fractions.gcd(lii, ans)
  ans = ans * lii // a
print(ans)


### FIXED CODE ###

import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
import fractions
from functools import reduce

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
li = [ri() for _ in range(n)]
ans = 1
for i in li:
  a = fractions.gcd(i, ans)
  ans = ans * i // a
print(ans)
S = input()
T = input()

for i in range(len(S)-len(T)+1):
	sub_S = S[i:i+len(T)]
	cnt = 0
	for j in range(len(T)):
		if sub_S[j] != T[j]:
			cnt += 1
	cnt_list.append(cnt)
print(min(cnt_list))

### FIXED CODE ###

S = input()
T = input()
cnt_list = []

for i in range(len(S)-len(T)+1):
  sub_S = S[i:i+len(T)]
  cnt = 0
  for j in range(len(T)):
    if sub_S[j] != T[j]:
      cnt += 1
  cnt_list.append(cnt)
print(min(cnt_list))
coin = int(input())
siawase = 0
if coin >= 500:
    siawase = siawase + int(coin / 500) * 1000
    amari = int(coin % 500)
    siawase = siawase + int(amari / 5) *5
elif coin >= 5:
    siawase = siawase + int(coin / 5) * 5
    
print(int(siawase))


### FIXED CODE ###

# 文字列の読み込み
s = input()
a = list(s)
if a[2] == a[3] and a[4] == a[5]:
    print('Yes')
else:
    print('No')
n = int(input())
list1 = [int(x) for x in input().split()]
#print(list1)

set1 = set(list1)
#print(set1)

listans = []

for i in set1:
  if list1.count(i) > 1:
    listans.append(i)

#print(listans)

if len(listans) < 2:
  print(0)
else:
  print(sorted(listans)[-1]*sorted(listans)[-2])

### FIXED CODE ###

x, a, b = input().split()
x = int(x)
a = int(a)
b = int(b)

if x > a:
	x_a = x - a
else:
	x_a = a - x

if x > b:
	x_b = x - b
else:
	x_b = b - x
	


if x_a > x_b:
	print("B")
else:
	print("A")
from bisect import bisect_left, bisect_right

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

an.sort()
bn.sort()
cn.sort()

cnt = 0

for b in bn:
    a = bisect_left(an,b)
    c = bisect_right(cn,b)
    cnt += a * (n-c)
print(cnt)

### FIXED CODE ###

from bisect import bisect_left, bisect_right

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

a.sort()
b.sort()
c.sort()

cnt = 0

for b_e in b:
    a_cases = bisect_left(a, b_e)
    c_cases = bisect_right(c, b_e)
    cnt += a_cases * (n - c_cases)
print(cnt)
s=input()
alp='abcdefghijklmnopqrstuvwxyz'

if s=='zyxwvutsrqponmlkjihgfedcba':
    print(-1)
    exit(0)

d={}
e={}
for i in range(len(alp)):
    d[alp[i]]=i
    e[i]=alp[i]

n=len(s)
if n!=26:
    ans=[]
    for i in range(n):
        ans.append(d[s[i]])

    for j in range(26):
        if j not in ans:
            ans.append(j)
            break

    st=''
    for k in ans:
        st+=e[k]
else:
    indices=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]
    dp=[]
    flgs=[0]*n

    for i in range(n):
        dp.append(min(indices))
        if dp[i]==d[s[i]]:
            flgs[i]=0
        else:
            flgs[i]=1
        indices.remove(d[s[i]])

    indices=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]
    ans=[]
    for j in range(n):
        if flgs[j]==0 and flgs[j+1]==0:
            ans.append(d[s[j]])
            indices.remove(d[s[j]])
        else:
            indices.remove(d[s[j]])
            ans.append(min(indices))
            break

    st=''
    for k in ans:
        st+=e[k]


print(st)

### FIXED CODE ###

s=input()
alp='abcdefghijklmnopqrstuvwxyz'

if s=='zyxwvutsrqponmlkjihgfedcba':
    print(-1)
    exit(0)

d={}
e={}
for i in range(len(alp)):
    d[alp[i]]=i
    e[i]=alp[i]

n=len(s)
if n!=26:
    ans=[]
    for i in range(n):
        ans.append(d[s[i]])

    for j in range(26):
        if j not in ans:
            ans.append(j)
            break

    st=''
    for k in ans:
        st+=e[k]
else:
    arr=[]

    dp=[]
    for i in range(n):
        dp.append(d[s[i]])
    
    while True:
        v=dp.pop()

        tmp=[j for j in arr if j>v]
        if len(tmp)!=0:
            dp.append(min(tmp))
            break
        
        arr.append(v)
        
    st=''
    for k in dp:
        st+=e[k]



print(st)
a,b=map(int,input().split())

List=[]
for i in range(a):
    List.append(input)

    print("".join(sorted(List)))

### FIXED CODE ###

a,b,c,=map(int,input().split())
if a+b+c==17:
  print("YES")
else:
  print("NO")
i = int(input())
seen = set()
seen.add(i)
temp = i
for x in rannge(0,1000000):
  if(temp%2 == 0):
    temp = temp/2
  else:
    temp = 3temp+1
  if(temp in seen):
    print(x)
    break
  else:
    seen.add(temp)

### FIXED CODE ###

i = int(input())
seen = set()
seen.add(i)
temp = i
for x in range(2,1000000):
    if(temp%2 == 0):
        temp = temp/2
    else:
        temp = 3*temp+1
    if(temp in seen):
        print(x)
        break
    else:
        seen.add(temp)
B
# -*- coding: utf-8 -*-
box = []
for i in range(0,5):
    box.append(int(input()))
amari = []
for i in range(0,5):
    amari.append(box[i] % 10)
for i in range(0,5):
    if amari[i] ==0:
        amari[i] = 100
    else:
        pass
sumtime = 0
box4 = box[4]
boxmin = box[amari.index(min(amari))]
box[amari.index(min(amari))] = box4 
box[4] = boxmin
for i in range(0,5):
    if i ==4:
        sumtime += box[i]
    elif box[i]%10==0:
        sumtime +=box[i]
    else:
        sumtime += (box[i] // 10)*10+10
print(sumtime)

### FIXED CODE ###

# -*- coding: utf-8 -*-
box = []
for i in range(0,5):
    box.append(int(input()))
amari = []
for i in range(0,5):
    amari.append(box[i] % 10)
for i in range(0,5):
    if amari[i] ==0:
        amari[i] = 100
    else:
        pass
sumtime = 0
box4 = box[4]
boxmin = box[amari.index(min(amari))]
box[amari.index(min(amari))] = box4 
box[4] = boxmin
for i in range(0,5):
    if i ==4:
        sumtime += box[i]
    elif box[i]%10==0:
        sumtime +=box[i]
    else:
        sumtime += (box[i] // 10)*10+10
print(sumtime)
N, A, B = map(int, input().split())

if n * a < b:
	print(n*a)
else:
	print(b)


### FIXED CODE ###

N, A, B = map(int, input().split())

if N * A < B:
	print(N*A)
else:
	print(B)
N = int(input())
A = list(map(int,input().split()))
Sum = 0

for i in range(N-1):
  if(A[N+1] - A[N] > 0):
    Sum += A[N+1] - A[N]
    
print(Sum)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
Sum = 0

for i in range(N-1):
  if(A[i] - A[i+1] > 0):
    Sum += A[i] - A[i+1]
    A[i+1] += A[i] - A[i+1]
 
print(Sum)
L,R = map(int,input()split())

x = 2019**2
for i in range(L, R):
    for r in range(i+1, R+1):
        ans = (i*r) % 2019 
        if x > ans:
            x = ans
            if x == 0:
        	    break
    if x == 0:
      break

### FIXED CODE ###

N,A,B = map(int,input().split())

print(min(N*A,B))
import sys
input = sys.stdin.readline

X,Y,Z,K = (int(i) for i in input().split())
ax = [int(i) for i in input().split()]
by = [int(i) for i in input().split()]
cz = [int(i) for i in input().split()]
ans = [0] * min(3000,X*Y*Z)
cnt = 0
for i in ax:
  for j in by:
    for k in cz:
      ans[cnt] = i + j + k
      cnt += 1
ans.sort(reverse=True)
for i in range(K):
  print(ans[i])

### FIXED CODE ###

import heapq

X,Y,Z,K = (int(i) for i in input().split())
a = [-int(i) for i in input().split()]
b = [-int(i) for i in input().split()]
c = [-int(i) for i in input().split()]
q = []
S = set()
a.sort()
b.sort()
c.sort()

heapq.heappush(q,(a[0]+b[0]+c[0],0,0,0))

for i in range(K):
  p,i,j,k=heapq.heappop(q)
  print(-p)
  if i+1 < X and not((i+1,j,k) in S):
    S.add((i+1,j,k))
    heapq.heappush(q,(a[i+1]+b[j]+c[k],i+1,j,k))
  if j+1 < Y and not((i,j+1,k) in S):
    S.add((i,j+1,k))
    heapq.heappush(q,(a[i]+b[j+1]+c[k],i,j+1,k))
  if k+1 < Z and not((i,j,k+1) in S):
    S.add((i,j,k+1))
    heapq.heappush(q,(a[i]+b[j]+c[k+1],i,j,k+1))
num = int(input())
A = list(map(int, input().split()))
H = sum(A) / 2
S = 0
for i in range(num):
  S += A[i]
  if abs(H - (S + A[i+1])) >= abs(H - S):
    # print(abs(2 * S - 2 * H))
    # break()
    


### FIXED CODE ###

num = int(input())
A = list(map(int, input().split()))
F = sum(A)
H = F / 2
S = 0
for i in range(num):
  S += A[i]
  if abs(H - (S + A[i+1])) > abs(H - S):
    print(abs(2 * S - F))
    break
dic = []
n = int(input())
for i in range(n):
    a = input()
    t=list(map(int,a.split()))
    if t[0] == "insert":
        dic.append(t[1])
    else:
        if t[1] in dic:
            print("yes")
        else:
            print("no")

### FIXED CODE ###

dic=dict()
n = int(input())
for i in range(n):
    a = input()
    t=a.split()
    if t[0] == "insert":
        dic[t[1]] = True
    else:
        if t[1] in dic:
            print("yes")
        else:
            print("no")
def minput():
    try:
        while True:
            data=raw_input()
            if not data: break
            yield data
    except KeyboardInterrupt:
        return
sorted(list(minput()),reverse=True)[:3]

### FIXED CODE ###

n=[]
for i in range(0, 10):
    n.append(int(raw_input()))
for i in sorted(n,reverse=True)[:3]:
    print i
#! /usr/bin/env python3

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)
MOD = pow(10, 9) + 7

N, K, *A = map(int, read().split())
A_pos = [a for a in A if a > 0]
A_neg = [a for a in A if a < 0]

if K == N:
    ans = 1
    for a in A:
        ans *= a
        ans %= MOD
elif len(A_neg) == N and K % 2 == 1:
    A = sorted(A, key=lambda x: abs(x))
    ans = 1
    for a in A[:K]:
        ans *= a
        ans %= MOD

else:
    A_pos = sorted(A_pos, key=lambda x: -abs(x))
    A_neg = sorted(A_neg, key=lambda x: -abs(x))
    ans = 1
    cnt = 0
    while True:
        if len(A_pos) > 1:
            acc_pos = A_pos[0] * A_pos[1]
        else:
            acc_pos = 0
        if len(A_neg) > 1:
            acc_neg = A_neg[0] * A_neg[1]
        else:
            acc_neg = 0

        if acc_pos > acc_neg or cnt == K - 1:
            if len(A_pos) > 0:
                ans *= A_pos[0]
                A_pos = A_pos[1:]
            else:
                ans *= A_neg[0]
                A_neg = A_neg[1:]
            ans %= MOD
            cnt += 1
        else:
            ans *= acc_neg
            ans %= MOD
            A_neg = A_neg[2:]
            cnt += 2

        if cnt == K:
            break

print(ans % MOD)


### FIXED CODE ###

#! /usr/bin/env python3

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)
MOD = pow(10, 9) + 7

N, K, *A = map(int, read().split())

if K == N:
    ans = 1
    for a in A:
        ans = ans * a % MOD
    print(ans)
    sys.exit()

A_pos = [a for a in A if a >= 0]
A_neg = [a for a in A if a < 0]

if len(A_pos) == 0:
    if K % 2 == 1:
        A_neg.sort(reverse=True)
    else:
        A_neg.sort()
    ans = 1
    for a in A_neg[:K]:
        ans = ans * a % MOD
    print(ans)
    sys.exit()

A_pos.sort()
A_neg.sort(reverse=True)
ans = 1
r = K
if r % 2 == 1:
    ans = ans * A_pos.pop() % MOD
    r -= 1

while r > 0:
    if len(A_pos) <= 1:
        ans = ans * A_neg.pop() * A_neg.pop() % MOD
    elif len(A_neg) <= 1:
        ans = ans * A_pos.pop() * A_pos.pop() % MOD

    else:
        acc_pos = A_pos[-1] * A_pos[-2]
        acc_neg = A_neg[-1] * A_neg[-2]

        if acc_pos > acc_neg:
            ans = ans * A_pos.pop() * A_pos.pop() % MOD
        else:
            ans = ans * A_neg.pop() * A_neg.pop() % MOD
    r -= 2
print(ans % MOD)
S = [i for i in input()]
f = 0
for i in range(len(S)//2):
  if not S[i] == S[-i]:
    f = 1
    print('No')
    break
if f == 0:
  s = S[:int((len(S)-1)/2)]
  for i in range(len(s)):
    if not s[i] == s[-i]:
      f = 1
      print('No')
      break
if f == 0:
  s = S[int((len(S)+3)/2):]
  for i in range(len(S)):
    if not s[i] == s[-i]:
      f = 1
      print('No')
      break
if f ==0:
  print('Yes')

### FIXED CODE ###

S = [i for i in input()]
f = 0
for i in range(len(S)//2):
  #print(S[i], S[-1-i])
  if not S[i] == S[-1-i]:
    f = 1
    print('No')
    break
#print(f)
if f == 0:
  s = S[:int((len(S)-1)/2)]
  for i in range(int(len(s)//2)):
    if not s[i] == s[-1-i]:
      f = 1
      print('No')
      break
#print(f)
if f == 0:
  s = S[int((len(S)+3)/2-1):]
  for i in range(int(len(s)//2)):
    #print(s[i], s[-1-i])
    if not s[i] == s[-1-i]:
      f = 1
      print('No')
      break
if f ==0:
  print('Yes')
def find_lcd(A,B):
  if A==B:
    return A
  else:
    return find_lcd(min(A,B), abs(A-B))
  
def find_num_prime(X):
  if X==1:
    return 1
  count = 1 # 1
  i=2
  sqrt_org=int(X**0.5)
  while X != 1:
    if i**2 > X:
      count += 1
      break
    if X%i == 0:
      count += 1
      while X%i == 0:
        #print(str(X)+' '+str(i))
        X = int(X/i)
    if i== 2:
      i += 1
    else:
      i += 2
  return count
  
A,B = map(int, input().split())
lcd=find_lcd(A,B)
#print(lcd)
print(find_num_prime(lcd))

### FIXED CODE ###

def find_lcd(A,B):
  if A==1 or B==1:
    return 1
  if A==B:
    return A
  else:
    return find_lcd(min(A,B), abs(A-B))
  
def find_num_prime(X):
  if X==1:
    return 1
  count = 1 # 1
  i=2
  sqrt_org=int(X**0.5)
  while X != 1:
    if i**2 > X:
      count += 1
      break
    if X%i == 0:
      count += 1
      while X%i == 0:
        #print(str(X)+' '+str(i))
        X = int(X/i)
    if i== 2:
      i += 1
    else:
      i += 2
  return count
  
A,B = map(int, input().split())
lcd=find_lcd(A,B)
#print(lcd)
print(find_num_prime(lcd))
a=int(input())
b=int(input())
e=a*b
c=a*2+b*2
print(e,c)

### FIXED CODE ###

a,b=map(int, input().split())
e=a*b
c=a*2+b*2
print(e,c)
N,A,B = map(int(),input(),strip())

A = A * N

if (A < B):
	print(A)
else:
	print(B)
	


### FIXED CODE ###

N,A,B = map(int, input().split())

A = A * N

if (A < B):
	print(A)
else:
	print(B)
a, b, c = map(int, input())
print(a+b, a+c, b+c)

### FIXED CODE ###

a, b, c = map(int, input().split())
print(min(a+b, a+c, b+c))
a,b=map(int,input().split())
print(a*(a-1)//2+b(b-1)//2)

### FIXED CODE ###

a,b=map(int,input().split())
print(a*(a-1)//2+b*(b-1)//2)
n = int(input())
s = input()

from collections import Counter
rgb = dict(Counter(s))
if len(dict) < 3:
    print('0')
else:
    p = rgb['R'] * rgb['G'] * rgb['B']
    for i in range(1, (len(s)-1)//2 + 1):
        for j in range(len(s) - 2*i):
            if {s[j], s[j + i], s[j + 2*i]} == {'R', 'G', 'B'}:
                p -= 1
    print(p)

### FIXED CODE ###

n = int(input())
s = input()

from collections import Counter
rgb = dict(Counter(s))
if len(rgb) < 3:
    print('0')
else:
    p = rgb['R'] * rgb['G'] * rgb['B']
    for i in range(1, (len(s)-1)//2 + 1):
        for j in range(len(s) - 2*i):
            if {s[j], s[j + i], s[j + 2*i]} == {'R', 'G', 'B'}:
                p -= 1
    print(p)