Harryxun/stf_run huggingface dataset:
(a, b) = [int(x) for x in input().split(' ')]

di = a // b:
m = a % b:
df = a / b:

print(dl, m, df)

### FIXED CODE ###

(a, b) = [int(x) for x in input().split()]

di = a // b
m = a % b
df = a / b

print('{0} {1} {2:.8f}'.format(di, m, df))
def keta_sum(x):
    sum = 0
    while x%10 !=0:
        sum += x%10
        x = x//10
    return(sum)

cnt=0
total=0
for x in range(1,N+1):
    y = keta_sum(x)
    if A<=y<=B:
        cnt +=1
        total +=x 
            
print(total)

### FIXED CODE ###

n,a,b=map(int,input().split())
print(sum(i for i in range(n+1) if a<=sum(map(int,str(i)))<=b))
import sys
for i in range(100):
    for l in range(100):
        if 4*i + 7*l == int(input()):
            print("Yes")
            sys.exit()
print("No")

### FIXED CODE ###

import sys
N = int(input())
for i in range(100):
    for l in range(100):
        if 4*i + 7*l == N:
            print("Yes")
            sys.exit()
print("No")
H=input()
A=input()
h = int(H)
a = int(A)
if mod(h,a) == 0:
    n = h // A
else:
    n = h // a +1
print(n)

### FIXED CODE ###

H,A =input().split()
h = int(H)
a = int(A)
if h % a == 0:
    n = h // a
else:
    n = h // a +1
print(n)
def search(u, n, g, disc, k):
    if disc[u] != None:
        circles = n - disc[u]
        v = (k - disc[u]) % circles
        ans = u
        for i in range(v):
            ans = g[ans]
        return ans + 1
    disc[u] = n
    return search(g[u], n+1, g, disc, k)

def resolve():
    n, k = map(int, input().split())
    g = list(map(lambda x: int(x) - 1, input().split()))
    disc = [None]*n
    v = search(0, 0, g, disc, k)
    print(v)
resolve()

### FIXED CODE ###

import sys
from io import StringIO
import unittest

sys.setrecursionlimit(10**5*2)

def search(u, n, g, disc, k):
    if disc[u] != None:
        circles = n - disc[u]
        v = (k - disc[u]) % circles
        ans = u
        if n > k:
            ans = 0
            for _ in range(k):
                ans = g[ans]
            return ans + 1
        for i in range(v):
            ans = g[ans]
        return ans + 1
    disc[u] = n
    return search(g[u], n+1, g, disc, k)

def resolve():
    n, k = map(int, input().split())
    g = list(map(lambda x: int(x) - 1, input().split()))
    disc = [None]*n
    v = search(0, 0, g, disc, k)
    print(v)
resolve()
A=input()
B=input()
x=int(A)
y=int(B)
print(x*y)

### FIXED CODE ###

a,b = map(int,input(). split ())
print(a*b)
import collections
n = int(input())
dat = []
for i in range(n):
    dat.append(int(input()))
mi = 10000000000000
res = collections.deque([])
res.append(dat[0])
import bisect
for i in range(1, n):
    a = bisect.bisect_left(res, dat[i])
    if a == 0:
        bisect.insort_left(res, dat[i])
    else:
        res[a-1] = dat[i]
print(len(res))

### FIXED CODE ###

def bisect_right(a, x, lo=0, hi=None):
    if lo < 0:
        raise ValueError('lo must be non-negative')
    if hi is None:
        hi = len(a)
    while lo < hi:
        mid = (lo + hi) // 2
        if x > a[mid]:
            hi = mid
        else:
            lo = mid + 1
    return lo

import collections
n = int(input())
dat = []
for i in range(n):
    dat.append(int(input()))
res = collections.deque([])

res.append(dat[0])
import bisect

for i in range(1, n):
    a = bisect_right(res, dat[i])
    #print("2 : {0}".format(a))

    if a == len(res):
        res.append(dat[i])
    else:
        res[a] = dat[i]
print(len(res))
#print(res)
n, k = map(int,input())
s = input()
k -= 1
print(s[:k]+s[k].lower()+s[k+1:])

### FIXED CODE ###

n, k = map(int,input().split())
s = list(input())
s[k-1] = s[k-1].lower()
for c in s:
  print(c, end='')
[N K] = list(map(int,input().split))
max = (N-1)*(N-2)/2
if max<K:
    print(-1)
    sys.exit()

tree = []
for i in range(2, N):
    tree.append(1,N)

for i in range(max-K):
    tree.append(i+2,i+3)

print(max + max-K)
for i in tree:
    print(str(i[0]) + " " +str([1]))

### FIXED CODE ###

[N ,K] = list(map(int,input().split()))
max = int((N-1)*(N-2)/2)
if max<K:
    print(-1)
    exit()

tree = []
for i in range(2, N+1):
    tree.append((1,i))
t = 3
a=0
for i in range(0, max-K):
    if i+t-a>N:
        a += i-a
        t+=1 
    tree.append((i+2-a,i+t-a))

print(len(tree))
for i in tree:
    print(str(i[0]) + " " +str(i[1]))
n=int(input())
List = [int(i) for i in input().split()]
ans=0
for i in range(n):
  for j in range(i):
    a+=List[i]*List[j]
print(ans)

### FIXED CODE ###

n=int(input())
List = [int(i) for i in input().split()]
a=0
for i in range(n):
  for j in range(i):
    a+=List[i]*List[j]
print(a)
C=input()
lst=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y"]
print(lst[lst.index(C)+1])

### FIXED CODE ###

C=input()
lst=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
print(lst[lst.index(C)+1])
X, K, D = map(int, input().split())
current_position = X

times = abs(X) // D

if times < K:
    if times > 0 :
        if current_position >= 0:
            current_position = current_position - D*times
        elif current_position < 0:
            current_position = current_position + D*times
    K = K - times
    if abs(current_position) <= D:
    if K % 2 == 1:
        if current_position >= 0:
            current_position = current_position - D
        elif current_position < 0:
            current_position = current_position + D
else:
    if times > 0 :
        if current_position >= 0:
            current_position = current_position - D*times
        elif current_position < 0:
            current_position = current_position + D*times
print(current_position)



### FIXED CODE ###

X, K, D = map(int, input().split())
current_position = X

times = abs(X) // D

if times < K:
    if times > 0 :
        if current_position >= 0:
            current_position = current_position - D*times
        elif current_position < 0:
            current_position = current_position + D*times
    K = K - times
    if K % 2 == 1:
        if current_position >= 0:
            current_position = current_position - D
        elif current_position < 0:
            current_position = current_position + D
else:
    if current_position >= 0:
        current_position = current_position - D * K
    elif current_position < 0:
        current_position = current_position + D * K
print(abs(current_position))
print(*sorted(map(int, input().spilt()))[::-1])


### FIXED CODE ###

print(*sorted(map(int, input().split()))[::-1])
import functools
import math
import collections
import scipy
import fractions
import itertools

def solve():
  n = int(input())
  a = list(map(int, input().split()))
  c = collections.Counter(a)
  s = 0
  for i in list(c.values()):
    s += i*(i-1)//2
  print(c)
  for i in a:
    print(c[i])
    print(s-(c[i]-1))
  return 0
 
if __name__ == "__main__":
  solve()


### FIXED CODE ###

import itertools

def solve():
  n, m = map(int, input().split())
  a = len(list(itertools.combinations(range(n), 2)))
  b = len(list(itertools.combinations(range(m), 2)))
  print(a + b)
  return 0

if __name__ == "__main__":
  solve()
_ = input()
T = list(map(int, input().split()))
M = int(input())
for i in range(M):
  P, X = map(int, input().split())
  ans = sum(T[:P]+T[P+1])+X

### FIXED CODE ###

_ = input()
T = list(map(int, input().split()))
M = int(input())
for i in range(M):
  P, X = map(int, input().split())
  ans = sum(T[:P-1])+sum(T[P:])+X
  print(ans)
N=int(raw_input())
A = [0 for i in range(10000000000)]

for i in range(N):
    a=int(raw_input())
    A[a-1]=(A[a-1]+1)%2

print(sum(A))

### FIXED CODE ###

N=int(raw_input())
A = []
for i in range(N):
    A.append(int(raw_input()))

A.sort()
prev=A[0]
count=1
all_count=0
for i in range(1,N):
    if prev==A[i]:
        count+=1
    else:
        prev=A[i]
        all_count+=count%2
        count=1
all_count+=count%2

print all_count
X=input()
if X>=30:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

X=int(input())
if X >= 30:
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())

paths = [set() for _ in range(M)]
for _ in range(M):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    paths[a].add(b)
    paths[b].add(a)

rooms = [-1] * N
rooms[0] = 0
marks = [-1] * (N-1)
key_rooms = [[0]]
for step in range(1, N):
    next_key_rooms = set()
    for key_room in key_rooms[-1]:
        for else_room in paths[key_room]:
            if rooms[else_room] == -1:
                rooms[else_room] = step
                next_key_rooms.add(else_room)
                marks[else_room-1] = key_room
    key_rooms.append(next_key_rooms)

print('Yes')
for i in marks:
    print(i+1)

### FIXED CODE ###

N, M = map(int, input().split())

paths = [set() for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    paths[a].add(b)
    paths[b].add(a)

rooms = [-1] * N
rooms[0] = 0
marks = [-1] * (N-1)
key_rooms = [[0]]
for step in range(1, N):
    next_key_rooms = set()
    for key_room in key_rooms[-1]:
        for else_room in paths[key_room]:
            if rooms[else_room] == -1:
                rooms[else_room] = step
                next_key_rooms.add(else_room)
                marks[else_room-1] = key_room
    key_rooms.append(next_key_rooms)

print('Yes')
for i in marks:
    print(i+1)
n, r = map(int, input.split())
if n >= 10:
  print(r)
else:
  print(r + 100*(10 - n))

### FIXED CODE ###

n, r = map(int, input().split())
if n >= 10:
  print(r)
else:
  print(r + 100*(10 - n))
from collections import Counter as cnt

N = int(input())
blue = []
for i in range(N):
  blue.append(int(input()))
blue = cnt(blue)
N = int(input())
red = []
for i in range(N):
  red.append(int(input()))
red = cnt(red)

p = blue - red
print(p.most_common()[0][1])


### FIXED CODE ###

from collections import Counter as cnt

N = int(input())
counter = {}
for i in range(N):
  s = input()
  if s not in counter:
    counter[s] = [1,0]
  else:
    counter[s][0] += 1
N = int(input())
for i in range(N):
  s = input()
  if s not in counter:
    counter[s] = [0,1]
  else:
    counter[s][1] += 1
counter[0] = [0,0]

print(max([b-r for b,r in counter.values()]))
a,b = map(float, raw_input().split())
d = (int) (a/b)
r = (int) (a%b)
f = (float) (a/b)
print ("{0} {1} {2:6f} .format(d,r,f))

### FIXED CODE ###

a,b = map(float, raw_input().split())
d = (int) (a/b)
r = (int) (a%b)
f = float (a/b)

print("{0} {1} {2:6f}".format(d,r,f))
N = int(input())
x = [0] * N
y = [0] * N
for i in range(N):
    x[i],y[i] = map(int,input().split())

memo = {}

for i in range(N-1):
    for j in range(i+1,N):
        dx = x[j] - x[i]
        dy = y[j] - y[i]
        if (dx,dy) in memo:
            memo[(dx,dy)] += 1
        elif (-dx,-dy) in memo:
            memo[(-dx,-dy)] += 1
        else:
            memo[(dx,dy)] = 1
        #print(memo)

M = max(memo.values())

print(N-M)


### FIXED CODE ###

N = int(input())
x = [0] * N
y = [0] * N
for i in range(N):
    x[i],y[i] = map(int,input().split())

if N == 1:
    print(1)
else:
    memo = {}

    for i in range(N-1):
        for j in range(i+1,N):
            dx = x[j] - x[i]
            dy = y[j] - y[i]
            if (dx,dy) in memo:
                memo[(dx,dy)] += 1
            elif (-dx,-dy) in memo:
                memo[(-dx,-dy)] += 1
            else:
               memo[(dx,dy)] = 1
            #print(memo)

    M = max(memo.values())

    print(N-M)
A,B,C,D = list(map(int,input().split()))
for num in range (A,B+1):
    if num in range (C,D+1):
        print("Yes")
        break
else:
    print("No")
       

### FIXED CODE ###

K = int(input())
P = str("ACL")
D = print(P*K)
age = int(input())
price = int(input())
if age >= 13:
    print(age, price)
elif age >= 6 and age <= 12:
    print(price // 2)
else:
    print(0)

### FIXED CODE ###

a, b = [int(x) for x in input().split()]

cost = 0
if a >= 13:
    cost = b
elif a >= 6:
    cost = b / 2
else:
    cost = 0

print(int(cost))
import sys
# input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)
MOD = 10 ** 9 + 7

S = list(input())
if S[-1] == '1':
    print (-1)
    exit()
if S[0] == '0':
    print (-1)
    exit(9)

N = len(S) - 1
n = (N + 1) // 2 #切り上げ

flag = True
tmp = -1
for i in range(n):
    if flag:
        if S[i] == S[N - 1 - i] == '1':
            tmp = i
        elif S[i] == S[N - 1 - i] == '0':
            flag = False
        else:
            print (-1)
            exit()
    else:
        if S[i] == S[N - 1 - i] == '0':
            continue
        else:
            print (-1)
            exit()

if tmp == 0:
    for k in range(N):
        print (1, k + 2)
    exit()

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

print (i + 2, i + 3)
if N - i != i + 3:
    print (N - i, i + 3)
else:
    exit()

for j in range(i + 4, N - i):
    print (i + 3, j)

### FIXED CODE ###

def main():
    S = list(input())

    N = len(S)

    if (S[0] == '0') or (S[-1] == '1'):
        print (-1)
        return 0

    lst = []
    for i in range((N - 1) // 2):
        if S[i] != S[N - 2 - i]:
            print (-1)
            return 0
        if S[i] == '1':
            lst.append(i + 1)
    if N % 2 == 0 and S[N//2 - 1] == '1':
        lst.append(N//2)
    # print (lst)

    if lst[-1] * 2 != N:
        center = lst[-1] + 1
        for x in range(lst[-1] * 2 + 2, N + 1):
            print (center, x)

        before = 1
        n = lst[-1] * 2 + 2
        tmp = 1
        for tmp in lst[1:]:
            print (before, tmp)
            print (n - before, n - tmp)
            for x in range(tmp - before - 1):
                print (before + 1 + x, tmp)
                print (n - (before + 1 + x), n - tmp)
            before = tmp
        print (tmp, center)
        print (n - tmp, center)

    if lst[-1] * 2 == N:
        before = 1
        n = lst[-1] * 2 + 1
        tmp = 1
        for tmp in lst[1:]:
            print (before, tmp)
            print (n - before, n - tmp)
            for x in range(tmp - before - 1):
                print (before + 1 + x, tmp)
                print (n - (before + 1 + x), n - tmp)
            before = tmp
        print (tmp, n - tmp)

if __name__ == '__main__':
    main()
N = int(input())

out = [i * 2 for i in range(1, N + 1)]

print(*out, " ")


### FIXED CODE ###

N = int(input())

sosuu = []

def next_sosuu():
    if len(sosuu) == 0:
        sosuu.append(2)
        return 2
    if len(sosuu) == 1:
        sosuu.append(3)
        return 3
    curr = sosuu[-1] + 2

    while True:
        flag = True
        for s in sosuu:
            if curr % s == 0:
                flag = False
                break
        if flag:
            sosuu.append(curr)
            return curr
        curr += 2

results = []
while len(results) < N:
    n = next_sosuu()
    if n % 5 == 1:
        results.append(n)

txt = ""
for r in results:
    txt += str(r) + " "
txt = txt[0:-1]
print(txt)
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int, a: "List[int]"):
    from collections import Counter
    ma, mi = max(a), min(a)
    if ma >= N or mi < 1:
        raise
    if ma - mi > 1:
        return False
    if ma == mi:
        return N % 2 == 0 or ma != N - 2
    c = Counter(a)
    if c[ma] % 2 != 0:
        return False
    return ma != c[ma] // 2 + c[mi] - 1

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    a = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    print(YES if solve(N, a) else NO)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int, a: "List[int]"):
    from collections import Counter
    ma, mi = max(a), min(a)
    if ma >= N or mi < 1:
        raise
    if ma - mi > 1:
        return False
    if ma == mi:
        return ma == N - 1 or  2 * ma <= N
    c = Counter(a)
    # pairがpairでない
    if c[ma] % 2 != 0:
        return False
    x = ma - c[ma] // 2
    if x < 0:
        return False
    # pair以外、すべてalone(crowdが0個)
    if x == c[mi]:
        return True
    # crowdを1つ以上作れるなら0以上c[mi]-2以下の好きな數を作れる
    return x <= c[mi] - 2

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    a = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    print(YES if solve(N, a) else NO)

if __name__ == '__main__':
    main()
N = int(input())
l = list(int, input().split())
print('Yes' if max(l) < sum(l) - max(l) else 'No')

### FIXED CODE ###

N = int(input())
l = list(map(int, input().split()))
print('Yes' if max(l) < sum(l) - max(l) else 'No')
L, R = map(int, input().split())

if R - L >= 2018:
      mod = 0
else:
    tempL = L%2019
    tempR = R%2019
    if tempR - tempL < R-L-1:
        temp = tempL
        tempL = 0
        X = list(range(tempL,temp))
        Y = list(range(tempR,2018+1))
        Z = X + Y
    else:
        Z = list(range(tempL,tempR+1))

ans = 2019
for i in range(len(Z)):
    for j in range(i+1, len(Z)):
        if (Z[i]*Z[j])%2019 < ans:
            ans = (Z[i]*Z[j])%2019
print(ans)


### FIXED CODE ###

L, R = map(int, input().split())

if R - L >= 2018:
      ans = 0
else:
    tempL = L%2019
    tempR = R%2019
    if tempR - tempL < R-L-1:
        temp = tempL
        tempL = 0
        X = list(range(tempL,temp))
        Y = list(range(tempR,2018+1))
        Z = X + Y
    else:
        Z = list(range(tempL,tempR+1))

    ans = 2019
    for i in range(len(Z)):
        for j in range(i+1, len(Z)):
            if (Z[i]*Z[j])%2019 < ans:
                ans = (Z[i]*Z[j])%2019
print(ans)
if S == 'ABC':
 print('ARC')
else:
 print('ABC')

### FIXED CODE ###

s=input()
print("ABC" if s=="ARC" else "ARC")
N = int(input())
edges = [[] for i in range(N+1)]
alledges = []
for i in range(N-1):
    a, b = map(int, input().split())
    alledges.append((a, b))
    edges[a].append(b)
    edges[b].append(a)

def dfs(node, parent):
    used = {col[(node, parent)]}
    curcol = 1
    for n in edges[node]:
        if n == parent: continue

        while curcol in used: curcol += 1

        col[(node, n)] = curcol
        col[(n, node)] = curcol

        dfs(n, node)

        used.add(curcol)
        
col = {}
start = max(range(1, N+1), key = lambda x : len(edges[x]))

for i, n in enumerate(edges[start]):
    col[(start, n)] = i + 1
    col[(n, start)] = i + 1
    dfs(n, start)



done = set()
print(len(edges[start]))
for e in alledges:
    print(col[e])


### FIXED CODE ###

import sys
sys.setrecursionlimit(10000000)

N = int(input())
edges = [[] for i in range(N+1)]
alledges = []
for i in range(N-1):
    a, b = map(int, input().split())
    alledges.append((a, b))
    edges[a].append(b)
    edges[b].append(a)

def dfs(node, parent):
    used = {col[(node, parent)]}
    curcol = 1
    for n in edges[node]:
        if n == parent: continue

        while curcol in used: curcol += 1

        col[(node, n)] = curcol
        col[(n, node)] = curcol

        dfs(n, node)

        used.add(curcol)
        
col = {}
start = max(range(1, N+1), key = lambda x : len(edges[x]))

for i, n in enumerate(edges[start]):
    col[(start, n)] = i + 1
    col[(n, start)] = i + 1
    dfs(n, start)



done = set()
print(len(edges[start]))
for e in alledges:
    print(col[e])
time = []
for i in range(5):
	time.append(int(input()))
remain = []
for i in range(5):
	if time[i] % 10 != 0:
		remain.append(10 - time[i] % 10)
sum = 0
for i in range(5):
	if time[i] % 10 == 0:
		sum += time[i]
	else:
		sum += (time[i] // 10 + 1) * 10

print(sum - max(remain))

### FIXED CODE ###

time = []
for i in range(5):
	time.append(int(input()))
remain = [0]
for i in range(5):
	if time[i] % 10 != 0:
		remain.append(10 - time[i] % 10)
sum = 0
for i in range(5):
	if time[i] % 10 == 0:
		sum += time[i]
	else:
		sum += (time[i] // 10 + 1) * 10

print(sum - max(remain))
s = input()
sum_of_digits = sum(map(int, s))
if (int)s % sum_of_digits:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

x = input()
sum_of_digits = sum(map(int, x))
check = int(x) % sum_of_digits
print('No' if check else 'Yes')
a = input()
s = input()

if ( a > 3200 ):
    print( s )
else:
    print( "red" )

### FIXED CODE ###

a = int(input())
s = input()

if ( a >= 3200 ):
    print( s )
else:
    print( "red" )
inf=10**10
def rec(n):
    if dp[n-1]!=inf:
        return dp[n-1]
    if n==1:
        dp[n-1]=0
        return dp[n-1]
    elif n==2:
        dp[n-1]=abs(a[n-1]-a[n-2])+rec(n-1)
        return dp[n-1]
    else:
        dp[n-1]=min(abs(a[n-1]-a[n-2])+rec(n-1),abs(a[n-1]-a[n-3])+rec(n-2))
        return dp[n-1]
           
n=int(input())
a=[int(i) for i in input().split()]
dp=[inf]*len(a)
print(rec(len(a)))

### FIXED CODE ###

def rec(a):
    dp=[0]*len(a)
    for i in range(len(a)):
        if i==0:
            dp[i]=0
        elif i==1:
            dp[i]=abs(a[i]-a[i-1])
        else:
            dp[i]=min(abs(a[i]-a[i-1])+dp[i-1],abs(a[i]-a[i-2])+dp[i-2])
    return dp[len(a)-1]
n=int(input())
a=[int(i) for i in input().split()]
print(rec(a))
a, b = map(int(input().split()))

print(max(a+b, a-b, a*b))

### FIXED CODE ###

a, b = map(int,input().split())
print(max(a+b, a-b, a*b))
def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

n,  = read_line(int)

m = 1000000007

domino = []
domino.append(input())
domino.append(input())

# print(domino[0])
# print(domino[1])

def compress(line):
    x = [line[0]]
    for c in line[1:]:
        if x[-1] != c:
            x.append(c)
    return x

domino[0] = compress(domino[0])
domino[1] = compress(domino[1])

xs = []
for i in range(len(domino[0])):
    xs.append(domino[0][i] != domino[1][i])
# print(xs)

patterns = None
if xs[0]:
    patterns = 6
else:
    patterns = 3

lastX = xs[0]
for x in xs[1:]:
    if x:
        # T -> T
        if lastX:
            patterns *= 3
        else:
            # F -> T
            patterns *= 2
    else:
        # T -> F
        if lastX:
            patterns *= 1
        else: # F -> F
            patterns *= 2
    lastX = x

print(patterns % m)

# T -> T

# 6 * 4 = 24

# 0|1120
# 1|2002

# 0
# 2

# 1
# 0

# 1
# 2

# 2
# 0

# 2
# 1


# F -> T

# 3 * 2 = 6

# 0|12
# 0|21
# 
# 1|02
# 1|20
# 
# 2|10
# 2|01


# T -> F

# 6 * 1 = 6

# 0|2
# 1|2

# 0|1
# 2|1

# 1|2
# 0|2

# 1|0
# 2|0

# 2|1
# 0|1

# 2|0
# 1|0

# F -> F

# 3 * 2 = 6

# 0 | 12
# 1 | 02
# 2 | 01


### FIXED CODE ###

def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

x, a, b = read_line(int, int, int)

print('A' if abs(x - a) < abs(x - b) else 'B')
N = int(input())
K = int(input())
h = []
a = 0
for i in range(N):
    b = int(input())
    h.append(b)
    if h[i] >= K:
        a += 1
print(a)


### FIXED CODE ###

NK_lis = list(map(int,input().split()))
h_lis = list(map(int,input().split()))
a = 0
for i in range(NK_lis[0]):
    if h_lis[i] >= NK_lis[1]:
        a += 1
print(a)
a,b=[int(i) for i in input().split()]
import math
print(a*b//math.gcd(a,b))

### FIXED CODE ###

import sys
sys.setrecursionlimit(20000000)
def gcd(m, n):
    r = m % n
    return gcd(n, r) if r else n

a,b=[int(i) for i in input().split()]

print(a*b//gcd(a,b))
N, M = map(int, input().split())
s = [list(map(int, input().split())) for i in range(M)]
s.sort(key=lambda x:x[1])

count=1
mae=[0][1]
for i in range(1,N):
    if s[i][0]>=mae:
        count+=1
        maes[i][1]

print(count)

### FIXED CODE ###

N, M = map(int, input().split())
s = [list(map(int, input().split())) for i in range(M)]
s.sort(key=lambda x:x[1])

count=1
mae=s[0][1]
for i in range(1,M):
    if s[i][0]>=mae:
        count+=1
        mae=s[i][1]

print(count)