Harryxun/stf_run huggingface dataset:
N = int(input())
count = 0
c = 0
for i in range(N):
    d1,d2 = input().split()
    if d1==d2:
        count+=1
        if count==3:
            c =1
            sys.exit()
    else:
        count=0
if count==1:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

N = int(input())
count = 0
c = 0
for i in range(N):
    d1,d2 = input().split()
    if d1==d2:
        count+=1
        if count==3:
            c =1

    else:
        count=0
if c==1:
    print('Yes')
else:
    print('No')
import numpy as np

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

a = np.array(a)

a_sort_raw = sorted(a)
a_arg_raw = np.argsort(a)

a_abs = list(map(abs,a))
a_abs = np.array(a_abs)

a_sort = sorted(a_abs,reverse=True)

a_arg = np.argsort(-a_abs)

a_arg_k = a_arg[0:k]
a_arg_k_ = a_arg[k:]

a_pow = 1

if all([1 if i < 0 else 0 for i in a]) and (k % 2 != 0):
    for i in range(n-1,k,-1):
        a_pow *= a[a_arg_raw[i]]

else:
    for i in range(k):
        a_pow *= a[a_arg[i]]
    
    if a_pow < 0:
        a_pow_p = 1
        for i in reversed(a_arg_k):
            if a[i] < 0:
                for j in a_arg_k_:
                    if a[j] > 0:
                        a_pow_p = a_pow/a[i]*a[j]
                        break
                break
                
        a_pow_m = 1
        for i in reversed(a_arg_k):
            if a[i] > 0:
                for j in a_arg_k_:
                    if a[j] < 0:
                        a_pow_m = a_pow/a[i]*a[j]
                        break
                break
        if a_pow_p > a_pow_m:
            a_pow = a_pow_p
        else:
            a_pow = a_pow_m

output = a_pow % (10**9 + 7)
print(output)


### FIXED CODE ###

N = int(input())

if N % 1000 == 0:
    print(0)
else:
    hasu = N - (N // 1000)*1000
    print(1000-hasu)
n=int(input())
p=list(map(int,input().split()))
a = [0]*n
b = [0]*n
for i in range(n):
  a[i] = 10 ** 5 * (i + 1) + p
  b[i] = 10 ** 5 * (n - i)
print(' '.join(map(str,a)))
print(' '.join(map(str,b)))

### FIXED CODE ###

n=int(input())
p=list(map(int,input().split()))
a = [0]*n
b = [0]*n
for i in range(n):
  a[p[i] - 1] += i
  a[i] += n * (i + 1)
  b[i] = n * (n - i)
print(' '.join(map(str,a)))
print(' '.join(map(str,b)))
x=int(input())
li=[]
for i in range(1,1001):
    for j in range(2,11):
        if i**j<=1000:
            li.append(i**j)
li=set(li)
li=sorted(list(li))

i=0
while li[i] <=x:
    i+=1
print(li[i-1])

### FIXED CODE ###

x=int(input())
li=[]
for i in range(1,1000):
    for j in range(2,11):
        if i**j<=x:
            li.append(i**j)
li=set(li)
li=sorted(list(li))

print(max(li))
N=int(input())
x=[]
y=[]
h=[]
for i in range(N):
    x_n,y_n,h_n=map(int,input().split())
    x.append(x_n)
    y.append(y_n)
    h.append(h_n)
for C_x in range(101):
    for C_y in range(101):
        H=h[0]+abs(x[0]-C_x)+abs(y[0]-C_y)
        if all(H==h[i]+abs(x[i]-C_x)+abs(y[i]-C_y) for i in range(N)):
            print(C_x,C_y,H)


### FIXED CODE ###

N=int(input())
if N==1:
    print("Hello World")
if N==2:
    A=int(input())
    B=int(input())
    print(A+B)
def f(a,b):
	if a==b:
		return 2*a
	elif a < b:
		return 2*a + f(a,b-a)
	else:
		return 2*b + f(a-b,b)


N,X = map(int,input().split(" "))

print(N+f(N-X,X))

### FIXED CODE ###

def f(a,b):
	if a==b:
		d=0
		ret = a
	elif a < b:
		d = b//a
		if b%a == 0:
			ret = a*(2*d -1)
		else:
			ret = 2*a*d + f(a,b%a)
	else:
		d = a//b
		if a%b == 0:
			ret = b*(2*d -1)
		else:
			ret = 2*b*d + f(a%b,b)
	#print(a,b,d,ret)
	return ret


N,X = map(int,input().split(" "))

print(N+f(N-X,X))
N=int(input())
A=list(map(int,input().split()))

even=[0 for i in range(N)]
odd=[0 for i in range(N)]
even[0]=max(0,A[0])
for i in range(1,N):
    if i%2==1:
        even[i]=even[i-1]
        odd[i]=odd[i-1]+max(0,A[i])
    else:
        even[i]=even[i-1]+max(0,A[i])
        odd[i]=odd[i-1]

eval=-10**20
L=-1
R=-1
for i in range(N):
    for j in range(N):
        if (j-i)%2==0:
            if i%2==0:
                test=even[j]-even[i-1]*(i!=0)+A[j]*(A[j]<0)+A[i]*(A[i]<0)
                if eval<test:
                    eval=test
                    L,R=i,j
            else:
                test=odd[j]-odd[i-1]*(i!=0)+A[j]*(A[j]<0)+A[i]*(A[i]<0)
                if eval<test:
                    eval=test
                    L,R=i,j

print(eval)
#print(L,R)

for i in range(N-1,R-1,-1):
    print(i+1)

for i in range(L-1):
    print(1)

A=A[L:R+1]
for i in range(L+2,R-1,2):
    if A[i]>0:
        print(2)
    else:
        print(3)
print(2)


### FIXED CODE ###

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

even=[0 for i in range(N)]
odd=[0 for i in range(N)]
even[0]=max(0,A[0])
for i in range(1,N):
    if i%2==1:
        even[i]=even[i-1]
        odd[i]=odd[i-1]+max(0,A[i])
    else:
        even[i]=even[i-1]+max(0,A[i])
        odd[i]=odd[i-1]

eval=-10**20
L=-1
R=-1
for i in range(N):
    for j in range(i,N):
        if j==i:
            test=A[i]
            if eval<test:
                eval=test
                L,R=i,i
        elif (j-i)%2==0:
            if i%2==0:
                test=even[j]-even[i-1]*(i!=0)+A[j]*(A[j]<0)+A[i]*(A[i]<0)
                if eval<test:
                    eval=test
                    L,R=i,j
            else:
                test=odd[j]-odd[i-1]*(i!=0)+A[j]*(A[j]<0)+A[i]*(A[i]<0)
                if eval<test:
                    eval=test
                    L,R=i,j

print(eval)
print(N-1-R+L+(R-L)//2)
#print(L,R)

for i in range(N-1,R,-1):
    print(i+1)

for i in range(L):
    print(1)

for i in range(L+2,R-1,2):
    if A[i]>0:
        print(2)
    else:
        print(3)
        
if L!=R:
    print(2)
n = int(input())
map_list = []
for _ in range(n):
    map_list.append(input().split())


def function():
    x = map_list[-1][0]
    y = map_list[-1][1]
    h = map_list[-1][2]

    for i in range(101):
        for j in range(101):
            c = 0
            H = abs(i - int(x)) + abs(j - int(y)) + int(h)
            #print('base:',i, j, H)
        
            for data in map_list[:-1]:
                x, y, h = data
                h = max(int(h), 0)
                #print('check:',i, j, H, abs(i - int(x)) + abs(j - int(y) + int(h)))
                if int(h) != max(H - abs(i - int(x)) - abs(j - int(y)), 0):
                    break
                c += 1
            if c >= n - 1:
                return i, j, H
            
i, j, H = function()
print(i, j, H)

### FIXED CODE ###

n = int(input())
map_list = []
for _ in range(n):
    map_list.append(input().split())

def function():
    for i in range(101):
        if int(map_list[i][2]) > 0:
            x = int(map_list[i][0])
            y = int(map_list[i][1])
            h = int(map_list[i][2])
            break
        else:
            continue

    for i in range(101):
        for j in range(101):
            cont_check = True
            H = abs(x - i) + abs(y - j) + h
            
            for data in map_list:
                xx, yy, hh = map(int, data)
                if hh != max(H - abs(xx - i) - abs(yy - j), 0):
                    cont_check = False
                    break
            if cont_check:
                return i, j, H

i, j, H = function()
print(i, j, H)
import fractions
def main():
    N, M = map(int, input().split())
    a = tuple(map(int, input().split()))
    s = a[0]
    for i in range(1,N):
        s = s * a[i] // fractions.gcd(s, a[i])
    s /= 2
    a = int(M // (2*s))
    if (M // s) % 2 == 0:
        print(a)
    else:
        print(a+1)
main()


### FIXED CODE ###

import fractions
def main():
    N, M = map(int, input().split())
    a = tuple(map(int, input().split()))
    s = a[0]
    s2 = a[0]
    s3 = 0
    while True:
        if s2 % 2 == 0:
            s2 /= 2
            s3 +=1
        else:
            break
    if s3 == 0:
        print(0)
        return 0
    for i in a:
        if i % (2 ** s3) != 0:
            print(0)
            return 0
        elif i % (2 ** (s3 + 1)) == 0:
            print(0)
            return 0
    for i in range(1,N):
        s = s * a[i] // fractions.gcd(s, a[i])
        if s > M*2:
            print(0)
            return 0
    s /= 2
    a = int(M // (2*s))
    if (M // s) % 2 == 0:
        print(a)
    else:
        print(a+1)
main()
from sympy import *
a,b,c = map(int,input().split())
print("Yes" if sqrt(a)+sqrt(b)<sqrt(c) else "No")

### FIXED CODE ###

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

if a+b<c and 4*a*b<(c-(a+b))**2:
    print("Yes")
else:
    print("No")
k = [] 
while True:
    m = raw_input().lower()
    if m == []:
        break
    k.append(m)
n = list(k)
charac = []
for j in range(97,97+26):
    m= 0
    for i in range(0,len(n)):
        if ord(n[i]) == j:
            m += 1
    charac.append("{} : {}".format(chr(j),m))

for i in range(0,26):
    print(charac[i])

### FIXED CODE ###

s =""
while True:
    try:
        s += input().lower()
    except:
        break
    
s = list(map(ord,list(s)))
for i in range(ord("a"),ord("z")+1):
    print(chr(i) + " : " + str(s.count(i)))
while True:
        a,op,b=map(input().split())
        a=float(a)
        b=float(b)
          
        if op=("+"):
                print(a+b)
        elif op=("-"):
                print(a-b)
        elif op=("*"):
                print(a*b)
        elif op=("/"):
                print(a/b)
        elif op=("?"):
                break



### FIXED CODE ###



while 1:
     s=input()
     if '?' in s: break
     print(int(eval(s)))
paper = [0,0,0,0,0,0,0,0,0,0]
N = int(input())
for _ in range(N):
    number = int(input())
    paper[number] += 1
sum = 0
for x in range(10):
    if paper[x] % 2 == 1
        sum += 1
print(sum)

### FIXED CODE ###

N = int(input())
set = set([])
for _ in range(N):
    p = int(input())
    if p not in set:
        set.add(p)
    else:
        set.remove(p)
print(len(set))
INF = float('inf')

input = sys.stdin.readline


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


N, K = LIST()
h = LIST()

h.extend([0] * K)

# DP配列を初期化
dp = [INF] * (N + K)

# 初期条件を入力
dp[0] = 0

# テーブルを更新 くばるDP
for i in range(0, N):
    for j in range(1, K + 1):
        dp[i + j] = min(dp[i + j], dp[i] + abs(h[i + j] - h[i]))

print(dp[N - 1])


### FIXED CODE ###

import sys

INF = float('inf')

input = sys.stdin.readline


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


N, K = LIST()
h = LIST()

# DP配列を初期化
dp = [INF] * N

# 初期条件を入力
dp[0] = 0

# テーブルを更新 もらうDP
for i in range(1, N):
    x = max(0, i - K)
    dp[i] = min([dp_ + abs(h[i] - h_) for dp_, h_ in zip(dp[x:i], h[x:i])])

print(dp[N - 1])
N,M,K = map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
 
a, b =[0],[0]
for i in range(N):
    a.append(a[i] + A[i])
for i in range(M):
    b.append(b[i] + B[i])
 
ans, j =0,M
for i in range(N+1):
    while b[j] > K-a[i]:
        j -= 1
    ans = max(ans, i+j)
print(ans)

### FIXED CODE ###

N,M,K = map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
 
a, b =[0],[0]
for i in range(N):
    a.append(a[i] + A[i])
for i in range(M):
    b.append(b[i] + B[i])
 
ans, j =0,M
for i in range(N+1):
    if a[i] > K:
        break
    while b[j] > K-a[i]:
        j -= 1
    ans = max(ans, i+j)
print(ans)
S = input()
if S =="Sunny":
  print("Cloudy")
elif:
  print("Rainy")
else:
  print("Sunny")

### FIXED CODE ###

S = input()
if S =="Sunny":
  print("Cloudy")
elif S == "Cloudy":
  print("Rainy")
else:
  print("Sunny")
n,m,X,Y = input().split()
x = list(map(int,input().split()))
y = list(map(int,input().split()))
x.append(X)
y.append(Y)
if max(x)<min(y):
    print("No War")
else:
    print("War")

### FIXED CODE ###

n,m,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
x.append(X)
y.append(Y)
if max(x)<min(y):
    print("No War")
else:
    print("War")
import math
import copy
from copy import deepcopy
import sys
import fractions
import numpy as np
from functools import reduce
import statistics
import heapq

input = sys.stdin.readline
sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

def getInputStr():
    inputStr = str(input())
    return inputStr

data = getInputStr()

a = str(data)
listStr = []
listStr = list(a)

del listStr[len(listStr)-1]
listStr.reverse()

dp = [[0]*13 for _ in range(len(listStr)+1)]
dp[0][0] = 1
ordinal = 1

INF = 10 ** 9 + 7

for i in range(len(listStr)):
    if i ==0:
        keta = 1
    else:
        keta = pow(10, i)

    if listStr[i] == "?":
        for k in range(10):
            for j in range(13):
                dp[i+1][int(((k*keta)%13 + j) % 13)] += dp[i][j]
                # dp[i + 1][int(((k * ordinal) + j) % 13)] %= INF
    else:
        k = int(listStr[i])
        for j in range(13):
            dp[i + 1][int(((k*keta)%13 + j) % 13)] += dp[i][j]
            # dp[i + 1][int(((k*ordinal) + j) % 13)] %= INF


ans = dp[len(listStr)][5] % INF
print(ans)

### FIXED CODE ###

import sys
import re
import math
import collections
import bisect
import itertools
import fractions
import functools
import copy
import heapq
import decimal
import statistics
import queue

# import numpy as np

sys.setrecursionlimit(10 ** 9)
INF = 10 ** 16
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))
nb = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))


# ===CODE===


def main():
    s = list(input())
    l = len(s)
    dp = [[0 for _ in range(13)] for __ in range(l + 1)]
    dp[0][0] = 1

    for i, si in enumerate(s):
        base = pow(10, l - i - 1, 13)

        if si == "?":
            for k in range(10):
                tmp = base * k % 13
                for j in range(13):
                    dp[i + 1][(j + tmp) % 13] += dp[i][j]
                    dp[i + 1][(j + tmp) % 13] %= MOD
        else:
            si = int(si)
            tmp = base * si % 13
            for j in range(13):
                dp[i + 1][(j + tmp) % 13] += dp[i][j]
                dp[i + 1][(j + tmp) % 13] %= MOD

    print(dp[l][5])


if __name__ == '__main__':
    main()
N = int(input())
A = list(map(int, input().split()))
count = 0
max = A[0]#最大値を保持しておくことでオーダーを減らす
for i in range (0,N):
    while(max>A[i]):
        count = count + 1
        
       # print(A)
    if(max<=A[i]):
        max = A[i]
      #  print(A)
print(count)

### FIXED CODE ###

N,X,T = map(int, input().split())

if N%X == 0:
    print(N//X*T)
else:
    print((N//X+1)*T)
import bisect
n,k=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
x=bisect.bisect_left(A,0,lo=0,hi=len(A))
y=bisect.bisect_right(A,0,lo=0,hi=len(A))
AN=x
A0=y-x
AP=n-y
if x!=0:
  An=A[:x]
else:
  An=[]
Ann=An[::-1]
Annn=[0]*AN
for i in range(AN):
  Annn[i]=Ann[i]*(-1)
if y!=n:
  App=A[-n+y:]
  Ap=App[::-1]
else:
  Ap=[]
if k<=AN*AP:
  ok=An[0]*Ap[0]-1
  ng=0
  while ng-ok>1:
    mid=(ok+ng)//2
    c=0
    for i in range(AN):
      c=c+AP-bisect.bisect_left(App,((-1)*mid+(-1)*An[i]-1)//((-1)*An[i]),lo=0,hi=AP)
    if c<k:
      ok=mid
    else:
      ng=mid
  ans=ok+1
  print(ans)
elif k<=n*(n-1)//2-AN*(AN-1)//2-AP*(AP-1)//2:
  print(0)
else:
  k=n*(n-1)//2-k+1
  ok=max(An[0]**2,Ap[0]**2)
  ng=0
  while ok-ng>1:
    mid=(ok+ng)//2
    c=0
    for i in range(AN):
      c=c+max(0,AN-i-1-bisect.bisect_left(Annn,(mid+Annn[AN-i-1]-1)//Annn[AN-i-1],lo=0,hi=AN))
    for i in range(AP):
      c=c+max(0,AP-i-1-bisect.bisect_left(App,(mid+App[AP-i-1]-1)//App[AP-i-1],lo=0,hi=AP))
    if c<k:
      ok=mid
    else:
      ng=mid
  ans=ok-1
  print(ans)

### FIXED CODE ###

import sys
import bisect
iuput=sys.stdin.readline
n,k=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
s=bisect.bisect_left(A,0,lo=0,hi=len(A))
t=bisect.bisect_right(A,0,lo=0,hi=len(A))
An=A[0:s]
Ap=A[t:n]
if k<=s*(n-t):
  #二分探査
  ng=-10**19
  ok=1
  while ok-ng!=1:
    #積がmid以下になる組み合わせの数をカウント
    mid=(ok+ng)//2
    c=0
    j=0
    for i in range(s):
      if j<n-t:
        while An[i]*Ap[j]>mid:
          j=j+1
          if j==n-t:
            break
      if An[i]*Ap[-1]>mid:
        j=n-t
      c=c+(n-t-j)
    if c<k:
      ng=mid
    else:
      ok=mid
  print(ok)
elif k<=n*(n-1)//2-((n-t)*(n-t-1)//2)-s*(s-1)//2:
  print(0)
else:
  k=n*(n-1)//2-k+1#大きい順にk番目
  Ann=[0]*s
  for i in range(s):
    Ann[i]=An[i]*-1
  Ann=Ann[::-1]
  App=[0]*(n-t)
  for i in range(n-t):
    App[i]=Ap[i]*-1
  App=App[::-1]
  ng=-10**19
  ok=1
  while ok-ng!=1:
    #積がmid以下になる組み合わせの数をカウント
    mid=(ok+ng)//2
    c=0
    j=0
    for i in range(s):
      if j<s:
        while An[i]*Ann[j]>mid:
          j=j+1
          if j==s:
            break
      if An[i]*Ann[-1]>mid:
        j=s
      c=c+(s-j)
    cc=0
    for i in range(s):
      if An[i]*A[i]*-1<=mid:
        cc=cc+1
    j=0
    for i in range(n-t):
      if j<n-t:
        while App[i]*Ap[j]>mid:
          j=j+1
          if j==n-t:
            break
      if App[i]*Ap[-1]>mid:
        j=n-t
      c=c+(n-t-j)
    for i in range(n-t):
      if Ap[i]*Ap[i]*-1<=mid:
        cc=cc+1
    c=(c-cc)//2
    if c<k:
      ng=mid
    else:
      ok=mid
  print(-1*ok)
N,A,B=map((int),input(),split())
if N*A>B:
    print(B)
else:
    print(N*A)

### FIXED CODE ###

N,A,B=map((int),input().split())
if N*A>B:
    print(B)
else:
    print(N*A)
print(1000-int(input()) % 1000 if int(input()) % 1000 else 0)



### FIXED CODE ###

N = int(input())
print(1000-N % 1000 if N % 1000 else 0)
a

### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    N = int(input())
    s = sorted(list(map(int, input().strip().split())), reverse=True)
    check = [False] * (2**N)
    now = []
    now.append([s[0], 1])
    check[0] = True
    ok = True
    for i in range(N):
        next_ = []
        tmp = 0
        for j in range(len(now)):
            hp, start = now[j]
            start = max(start, tmp)
            ok = False
            for k in range(start, 2**N):
                if s[k] < hp and not check[k]:
                    tmp = k+1
                    now[j][1] = k+1
                    check[k] = True
                    next_.append([s[k], k+1])
                    ok = True
                    break
            if not ok:
                break
        now += next_
        now = sorted(now, reverse=True)
        if not ok:
            break
    
    if ok:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()
n, k = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A)

MOD = 10 ** 9 + 7

ans = 0
combinations = list()
for j, i in enumerate(range(k - 1, n)):
    if i == (k - 1):
        combinations.append(1)
    else:
        combinations.append(combinations[-1] * i // (i - k + 1))
    combinations[-1] = combinations % MOD
    # print(i, 'C', k - 1, '=', combinations[-1])

# print(combinations)
# print(A)
combinations = combinations[::-1]
for j, i in enumerate(range(k - 1, n)):
    ans += (A[-j - 1] * combinations[j] % MOD)

for j, i in enumerate(range(k - 1, n)):
    ans -= (A[j] * combinations[j] % MOD)
    if ans < 0:
        ans = ans - (ans // MOD) * MOD

ans %= MOD
print(ans)


### FIXED CODE ###

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

MOD = 10 ** 9 + 7


def pow(a, n):
    if n == 0:
        return 1
    else:
        temp = pow(a, n // 2)
        if n % 2 == 0:
            return temp * temp % MOD
        else:
            return temp * temp * a % MOD
        
        
ans = 0
combinations = list()
for j, i in enumerate(range(k - 1, n)):
    if i == (k - 1):
        combinations.append(1)
    else:
        combinations.append(combinations[-1] * i * pow(i - k + 1, MOD - 2))
    combinations[-1] = combinations[-1] % MOD
    # print(i, 'C', k - 1, '=', combinations[-1])

# print(combinations)
# print(A)
combinations = combinations[::-1]
for j, i in enumerate(range(k - 1, n)):
    ans += (A[-j - 1] * combinations[j] % MOD)

for j, i in enumerate(range(k - 1, n)):
    ans -= (A[j] * combinations[j] % MOD)
    if ans < 0:
        ans = ans + (- ans // MOD + 1) * MOD

ans %= MOD
print(ans)
import math
s = input().split()
a = int(s[0])
b = int(s[1])
print(int(a*b/math.gcd(a,b)))

### FIXED CODE ###

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
s = input().split()
a = int(s[0])
b = int(s[1])
re = int(a*b/gcd(a, b))
print(re)
s=input()
ans=''
for _ in len(s):
  ans+='x'

### FIXED CODE ###

a=input()
print("".join(["x" for x in a]))
from collections import deque
que=deque([i for i in range(1,10)])
k=int(input())
count=0
while count!=k-1:
  a=que.popleft()
  count+=1
  if a%10==1:
    que.extend([10*a+1,10*a+2])
  elif a%10==9:
    que.extend([10*a+8,10*a+9])
  else:
    b=a*10+(a%10)-1
    que.extend([b,b+1,b+2])
print(a)



### FIXED CODE ###

from collections import deque
que=deque([i for i in range(1,10)])
k=int(input())
count=0
while count!=k:
  a=que.popleft()
  count+=1
  if a%10==9:
    que.extend([10*a+8,10*a+9])
  elif a%10==0:
    que.extend([10*a,10*a+1])
  else:
    b=a*10+(a%10)-1
    que.extend([b,b+1,b+2])
print(a)
n = int(input())
for i in range(1, n+1):
    if i % 3 == 0:
        print(' '+str(i), end = '')
    elif i % 10 ==3:
        print(' '+str(i), end = '')
    else:
        x = i
        while x != 0:
            x //= 10
            if x % 10 == 3:
                print(' '+str(i), end = '')
print('')

### FIXED CODE ###

n = int(input())
for i in range(1, n+1):
    if i % 3 == 0:
        print(' '+str(i), end = '')
    elif i % 10 ==3:
        print(' '+str(i), end = '')
    else:
        x = i
        while x != 0:
            x = x // 10
            if x % 10 == 3:
                print(' '+str(i), end = '')
                break
print('')
n=int(input())
a=list(map(int,input().split()))
m=10**9+7
b=[-1]*3
ans=1
for i in range(0,n):
  j=a[i]
  ans*=(b.count(j-1))
  ans%=m
  b[b.index(j-1)]+=1
print(ans%m)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
m=10**9+7
b=[0]*3
ans=1
for i in a:
  ans*=b.count(i)
  ans%=m
  for j in range(3):
    if b[j]==i:
      b[j]+=1
      break
print(ans%m)
x=input()
y=input()
x=int(x)
y=int(y)
xg=set()
yg=set()
for i in range(1,x+1):
    if x%i==0:
        xg.add(i)
for j in range(1,y+1):
    if y%j==0:
        yg.add(j)
gcd=xg & yg
print(max(gcd))


### FIXED CODE ###

if __name__ == '__main__':
    s = input().split()
    if s[0] < s[1]:
        tmp = s[0]
        s[0] = s[1]
        s[1] = tmp
    while True:
        x = int(s[0]) % int(s[1])
        if x==0:
            break
        s[0] = s[1]
        s[1] = x
 
    print (s[1])
import sys
import numpy as np

sys.setrecursionlimit(10 ** 9)

N = int(input())
S = input()

rgb = [0,0,0]
for i in range(N):
    if S[i] == 'R':
        rgb[0] += 1
    elif S[i] == 'G':
        rgb[1] += 1
    else:
        rgb[2] += 1

ans = rgb[0] * rgb[1] * rgb [2]
#print(ans)

for i in range(N):
    for j in range(1,(N-i+1)//2):
        if S[i] != S[i+j] and S[i] != S[i+2*j] and S[i+j] != S[i+2*j]:
            ans -= 1
#        print(ans,i,i+j,i+2*j)
print(ans)
            

### FIXED CODE ###


import sys
import numpy as np

sys.setrecursionlimit(10 ** 9)

N = int(input())
S = input()

rgb = [0,0,0]
for i in range(N):
    if S[i] == 'R':
        rgb[0] += 1
    elif S[i] == 'G':
        rgb[1] += 1
    else:
        rgb[2] += 1

ans = rgb[0] * rgb[1] * rgb [2]
#print(ans)

for i in range(N):
    for j in range(1,(N-i+1)//2):
        if S[i] != S[i+j] and S[i] != S[i+2*j] and S[i+j] != S[i+2*j]:
            ans -= 1
#        print(ans,i,i+j,i+2*j)
print(ans)