peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
import sys
import bisect
input = sys.stdin.readline

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

for j in range(n):
    al=bisect.bisect_left(a,b[j])
    cl=n-bisect.bisect_right(c,b[j])
    ans+=al*cl
print(ans)
# Judge status: Wrong Answer
s=input()
n=len(s)
sum=0

for i in range(n):
  if s[i]!=s[n-i-1]:
    sum+=1
    print(sum//2)
# Judge status: Accepted
from fractions import gcd
from functools import reduce

N, X = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
diff = []
for i in range(N):
    diff.append(abs(x[i] - X))

while len(diff) > 1:
    a, b = diff.pop(), diff.pop()
    diff.append(gcd(a, b))

print(diff[0])
# Judge status: Accepted
n = int(input())

ans = ''

while n > 0:
    n -= 1
    ans += chr(ord('a') + n % 26)
    n //= 26

print(ans[::-1])
# Judge status: Accepted
import math
n,d = map(int,input().split())
r = 0
for i in range(n):
  a,b = map(int,input().split())
  if d >= math.sqrt(a**2 + b**2):
  	r += 1
print(r)
# Judge status: Accepted
from collections import Counter

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

    c = Counter(A)
    vals = c.keys()
    cnts = c.values()

    subs = {}
    a_sum = 0
    for v, c in zip(vals, cnts):
        subs[v] = c - 1
        a_sum += (c * (c-1)) // 2
    
    for a in A:
        print(a_sum - subs[a])


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))

b = [-1] * n
for i in range(n, 0, -1):
    cnt = sum(b[j] for j in range(i + i, n, i))
    b[i - 1] = int(a[i - 1] != cnt % 2)

print(sum(b))
if sum(b) > 0:
    print(*[i for i in b if i == 1])
# Judge status: Accepted
def GetColor(point):
   color = point//400
   if color>=8:
      color = -1
   return color

N = int(input())
A = map(int,input().split())
Nc = [0 for i in range(9)]
for ai in A:
   Nc[GetColor(ai)]+=1

Nf = Nc[-1]
Ans = 0
for ic in range(len(Nc)-1):
   if Nc[ic]>0:
      Ans+=1
# maxNc = min(Ans+Nf, 8)
maxNc = Ans+Nf
minNc = max(1,Ans)
print("%d %d"%(minNc,maxNc))
# Judge status: Wrong Answer
ATK = 0
MP = 1
EF = 2

H, N = [int(i) for i in input().split()]
magics = []
for n in range(N):
  a, b = [int(i) for i in input().split()]
  magics.append([a, b, a / b])

gm = magics[0]  # great magic
for m in magics:
  if gm[EF] < m[EF]:
    gm = m

mp = (H // gm[ATK]) * gm[MP]
H = H % gm[ATK]

# totyuu
# Judge status: Accepted
a,b,c=map(int,input().split())
for i in range(a+1):
    for j in range(b+1):
        if (a-i)*j+(b-j)*i==c:
            print('Yes')
            exit()
print('No')
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
write = sys.stdout.write
def ii(): return int(readline())
def mi(): return map(int, readline().rstrip().split())
def li(): return list(readline().rstrip())
def lmi(): return list(map(int, readline().rstrip().split()))
def end(*arg): print(*arg); sys.exit()
# template


def main():
    k, x = mi()
    if 500 * k >= x:
        print("YES")
    else:
        print("NO")
    return


if __name__ == '__main__':
    main()
# Judge status: Accepted
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
ans=0;m=100000000
A=A*1000;T=T*1000
for i in range(N):
    if abs(A-(T-(H[i]*6))) < m:m=abs(A-(T-(H[i]*6)));ans=i+1
print(ans)
# Judge status: Wrong Answer
n , m = map(int, input().split())
ans = set(list(i for i in range(m)))
for i in range(n):
  ans = ans & set(list(map(int, input().split()))[1:])
print(len(ans))
# Judge status: Accepted
# python 3.4.3
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# library
# -------------------------------------------------------------



# -------------------------------------------------------------
# main
# -------------------------------------------------------------
A,B = map(int,input().split())

print("Odd" if (A*B)%2==1 else "Even")
# Judge status: Wrong Answer
x = int(input())
lis = []
for i in range(-35,36):
    lis.append(i**5)
tab = [[0]*71 for _ in range(71)]
for j in range(71):
    for k in range(71):
        tab[j][k] = lis[j]-lis[k]
for l in range(71):
    for m in range(71):
        if tab[l][m] == x:
            print(l-35, m-35)
            exit()
# Judge status: Wrong Answer
import sys

s = input()
c = 0

for i in range(len(s)):
    if s[i] == 'A':
        while(s[i] != 'Z'):
            c += 1
            i += 1
        if s[i] == 'Z':
            c += 1
            exit()
            
print(c)
# Judge status: Wrong Answer
N=int(input())
AB={}
answer="Yes"
for i in range(N):
    a,b=map(int,input().split())
    if b not in AB.keys():
        AB[b]=a
    else:
        AB[b]+=a
        if AB[b]>b:
            answer="No"

print(answer)
# Judge status: Accepted
s = list(input())
ans = set(s)
if len(ans) > 1:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
a = int(input())
b = int(input())
c = int(input())
S = (a+b)*c/2
print(S)
# Judge status: Wrong Answer
n, m = map(int, input().split())
x = sorted(set(map(int, input().split())))
t = []
for i in range(m-1):
    t.append(abs(x[i] - x[i+1]))
t = sorted(t)
print(sum(t[:-n+1]))
# Judge status: Accepted
N, K, Q = map(int, input().split())
A = []
for _ in range(Q):
    A.append(int(input()) - 1)

border_line = 0
points = [K]*N

for i in range(Q):
    points[A[i]] += 1
    border_line += 1

for j in range(N):
    if points[j] - border_line > 0:
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
if input() == 'ABC':
    print('ARC')
else:
    print('ABC')
# Judge status: Accepted
N = int(input())
P = [int(k) for k in input().split()]

maxes = []
mins  = []

max = 0
min = 0
result = 0

for i in range(N):
    if i == 0:
        max = P[i]
        min = P[i]
    else:
        if(max < P[i]):
            max = P[i]
        if(min > P[i]):
            min = P[i]

    maxes.append(max)
    mins.append(min)

for i in range(N):
    if mins[i] == P[i]:
        result = result + 1

print(result)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if a<c and c<b:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
N,A,B=map(int,input().split())

if (B-A)%2==0:
    print((B-A)//2)
else:
    left=B-1
    right=N-A
    print(min(left,right))
# Judge status: Accepted
from collections import Counter
n = int(input())
d_1 = Counter()
d_2 = Counter()
A = map(int, input().split())
for i, a in enumerate(A):
    i += 1
    d_1[i - a] += 1
    d_2[i + a] += 1

c = 0
for k, v in d_1.items():
    if d_2[k] > 0:
        c += v * d_2[k]
print(c)
# Judge status: Accepted
import copy
N,M,X=map(int,input().split())
A=[0]*(N)
for i in range(N):
  A[i]=[int(x) for x in input().split()]
def nap(p,q):
  if q==N:
    if min(p[1:M+1])>=X:
      lity[-1]=min(lity[-1],p[0])
    return
  nap(copy.copy(p),q+1)
  for i in range(M+1):
    p[i]=p[i]+A[q][i]
  nap(copy.copy(p),q+1)
lity=[]
lity.append(10**9)
r=[0]*(M+1)
nap(r,0)
if lity[-1]==10**9:
  print(-1)
else:
  print(lity[-1])
# Judge status: Accepted
import math

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

v = a*a*b

if x <= v/2:
  c = (2*x/b)/a
  ans = math.degrees(math.atan(b/c))
else:
  x = v - x
  d = 2*x/(a*a)
  ans = math.degrees(math.atan(d/a))
print(ans)
# Judge status: Accepted
d = int(input())

if d == 25:
  print("Christmas")
if d == 24:
  print("Christmas Eve")
if d == 23:
  print("Christmas Eve Eve")
if d == 22:
  print("Christmas Eve Eve Eve")
# Judge status: Accepted
N = int(input())
alphabet_list = [chr(i) for i in range(97, 97 + N)]

import collections

previous_list = ["a"]
for i in range(1, N):
    out_list = []
    for a in previous_list:
        # print(len(collections.Counter(a)))
        for al in alphabet_list[:len(collections.Counter(a))+1]:
            # print(a + al)
            out_list.append(a+al)
    previous_list = out_list

for out in previous_list:
    print(out)
# Judge status: Accepted
print(int(int(input())**(1/2))**2)
# Judge status: Accepted
def main():
    from itertools import accumulate
    n, k = map(int, input().split())
    *exp, = map(lambda x: (int(x) + 1) / 2, input().split())
    l = accumulate(exp)
    l = list(l)
    ll = [l[k - 1]] + [j - i for i, j in zip(l, l[k:])]
    ans = max(ll)
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Accepted
n=int(input())
A=list(map(int,input().split()))
A.sort()
A.reverse()
ans=int(0)
for i in range(n):
    ans+=A[2*i+1]
print(ans)
# Judge status: Accepted
# Problem C - Rectangle Cutting

# input
W, H, x, y = map(int, input().split())

# initialization
ans = (W * H) / 2
is_ok = (x*2==W) and (y*2==H)

if is_ok:
    print("%f %d"%(ans, 1))
else:
    print("%f %d"%(ans, 0))
# Judge status: Accepted
a,b,c,d = map(int, input().split())

if abs(a-b) <= d and abs(b-c) <= d or abs(a-c) <=d:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n,m = list(map(int, input().split()))
flag = 0

if n%2!=0:
    for i in range(m):
        print(i+1,n-i)
else:
    for i in range(m):
        if ((n-i)-(i+1))<=n-((n-i)-(i+1)):
            flag = 1
        if flag==0:
            print(i+1,n-i)
        else:
            print(i+1,n-i-1)
# Judge status: Accepted
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
#S = str(input())
A, B, C = map(int, input().split())

if A > B :
  A, B = B, A
  
if A < C < B :
  print ("Yes")
else :
  print ("No")
# Judge status: Accepted
n,m,k=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
AS=[0]
BS=[0]
r=0
for i in A:
  if i+AS[-1]<=k:
    AS.append(i+AS[-1])
  else:
    break
    
for i in B:
  if i+BS[-1]<=k:
    BS.append(i+BS[-1])
  else:
    break
    
j=len(BS)-1
for i in range(len(AS)):
  while AS[i]+BS[j]>k:
    j-=1
  r=max(r,i+j)
print(r)
# Judge status: Accepted
s=input()
ans=[0,0]
for i in range(len(s)):
    now=int(s[i])
    ans[0]+=now^0^(i%2)
    ans[1]+=now^1^(i%2)
print(min(ans))
# Judge status: Accepted
N = int(input())

if N==0:
    print(0)
    exit()

ans = []
t = 1
p = 1

while N!=0:
    if N%(p*2)!=0:
        ans.append(1)
    else:
        ans.append(0)

    N -= ans[-1]*p*t
    t *= -1
    p *= 2

print(''.join(map(str, ans[::-1])))
# Judge status: Wrong Answer
N, X = map(int, input().split())
a = list(map(int, input().split()))

if N == 1:
  print(a[0] - X)
  exit()
  
m = []
for aa in a:
  m.append(abs(X-aa))

ans = 0
import fractions
for i, g in enumerate(m):
  ans = fractions.gcd(ans, g)
  
print(ans)
# Judge status: Wrong Answer
def main():
    quantity, A, B = map(int, input().split())
    l = list(input())
    yes = 0
    
    for i in range(quantity):
        if l[i] == 'a' and yes < (A + B):
            print('Yes')
            yes += 1
            continue
        elif l[i] == 'b' and yes < (A + B):
            if yes <= B:
                print('Yes')
                yes += 1
                continue
        print('No')

main()
# Judge status: Accepted
n = int(input())
a = reversed(list(map(int, input().split())))
ans = [-1] * n
i = 0
for _a in a:
    if i % 2 == 0:
        ans[i // 2] = _a
    else:
        ans[-((i // 2) + 1)] = _a
    i += 1
for _ans in ans:
    print(_ans, end=" ")
# Judge status: Accepted
s = input()
s = list(s)
s[3] = '8'
print(''.join(s))
# Judge status: Accepted
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

x = [0]
y = [0]
for i in range(n):
    x.append(x[i] + a[i])
    
for i in range(m):
    y.append(y[i] + b[i])
    
i = 0
j = m
ans = 0
while i <= n and 0 <= j:
    if x[i] + y[j] <= k:
        ans = max(ans, i + j)
        i += 1
    else:
        j -= 1

print(ans)
# Judge status: Accepted
N, M = map(int, input().split())
ab = []
for _ in range(N):
    ab.append(tuple(map(int, input().split())))
cd = []
for _ in range(M):
    cd.append(tuple(map(int, input().split())))


for person in ab:
    x, y = person
    m = 10 ** 9
    togo = 0
    for i, checkpoint in enumerate(cd):
        cx, cy = checkpoint
        dist = abs(x - cx) + abs(y - cy)
        if dist < m:
            m = dist
            togo = i
            #print(x, y, cx, cy)
    print(togo + 1)
# Judge status: Accepted
n = int(input())
v = list(map(int,input().split()))
V = sorted(v, reverse=True)
ans = 0
for i in range(n-1):
    ans += V[i]/(2**(i+1))
print(ans+V[n-1]/(2**(n-1)))
# Judge status: Wrong Answer
n,k=map(int,input().split());a=list(map(int,input().split()))
print(min([abs(max(j)-min(j))+abs(min(j)) for j in [a[i:i+k] for i in range(n-k+1)]]))
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n = int(input())
    ans = ""
    while n > 0:
        n -= 1
        ans = chr(n%26 + ord('a')) + ans
        n //= 26
    print(ans)

if __name__=='__main__':
    main()
# Judge status: Wrong Answer
S = input()
N = len(S)

count = 0

for i in range(N):
  if S[i] != S[N - 1 - i]:
    count = count + 1
    S = S.replace(S[i], S[N - 1 - i], 1)

print(count)
# Judge status: Accepted
#!/usr/bin/env python3
import sys


input = sys.stdin.readline
def IS(cb): return cb(input().strip())
def IL(cb): return [cb(s) for s in input().strip().split()]
def IR(cb, rows): return [IS(cb) for _ in range(rows)]
def ILL(cb, rows): return [IL(cb) for _ in range(rows)]


def solve():
    N, M = IL(int)
    print(N * M)

solve()
# Judge status: Wrong Answer
a, b, c = map(int, input().split())
print(a+b*10+c)
# Judge status: Accepted
N, M = map(int, input().split())
students = [tuple(map(int, input().split())) for _ in range(N)]
checkpoints = [tuple(map(int, input().split())) for _ in range(M)]

for a, b in students:
    min_dist = 10 ** 9
    ans = -1
    for i in range(M):
        c, d = checkpoints[i]
        distance = abs(a - c) + abs(b - d)
        if distance < min_dist:
            min_dist = distance
            ans = i + 1
    print(ans)
# Judge status: Wrong Answer
a,b,c,d=map(int,input().split());print("YNeos"[a-b>d and b-c>d or a-c>d::2])
# Judge status: Accepted
H, N = list(map(int, input().split()))
dp = [[float('inf')] * (H + 1)]
dp[0][0] = 0
magic = []
for i in range(N):
  magic.append(list(map(int, input().split())))
  
for i in range(H+1):
  next = dp[i]
  if dp[i][i] != float('inf'):
    for j in magic:
      next[min(H, i + j[0])] = min(dp[i-1][i] + j[1], dp[i][min(H, i + j[0])])
  dp.append(next)

print(dp[-1][-1])
# Judge status: Wrong Answer
a=list(map(int,input().split()))
count=0
for v in range(2):
    if a[0]>=a[1]:
        count+=a[0]
    else:
        count+=a[1]
print(count)
# Judge status: Wrong Answer
D,N = map(int,input().split())

if D == 0:
    print(N)
else:
    q = (N-1)&99
    print((N-q)*(100**D))
# Judge status: Wrong Answer
from collections import Counter
n = int(input())
s = input()
mod = 10**9+7

s_c = list(Counter(s).values())

n_c = len(s_c)

ans = 0
for i in range(1,2**n_c):
    tmp = 1
    for j in range(n_c):
        if ((i>>j)&1):
            tmp=tmp*s_c[j]%mod
    ans+=tmp
print(ans)
# Judge status: Wrong Answer

s = str(input().split())
i = 0 + 2
while True:
    print(i,' : ',s[i])
    if s[i] == s[i + 1]:
        print_ans = 'Bad'
        break
    else:
        print_ans = 'Good'
    i += 1
    if i == 3 + 2:
        break
    
print(print_ans)
# Judge status: Accepted
n = int(input())
S = input()
x = 0
y = S.count('.')
c = min(n-y, y)
for i in range(n):
  t = S[i]=='#'
  x += t
  y -= 1-t
  c = min(c, x+y)
print(c)
# Judge status: Wrong Answer
N = int(input())

for i in range (11):

    if(N<1000*(i+1)):
        pre = i+1
        break

ans = pre*1000 - N

print(ans)
# Judge status: Accepted
n = int(input())

ans = 0
for i in range(1, n + 1):
    if i % 2 == 0:
        continue
    dividors = []
    for j in range(1, n + 1):
        if i % j == 0:
            dividors.append(j)
    if len(dividors) == 8:
        ans += 1
print(ans)
# Judge status: Wrong Answer
x = int(input())
a = x // 100
b = x - a * 100

while b >= 5:
	b = b - 5
	a -= 1
	if b == 0:
		f=True
if a>=1:
	print(1)
else:
	print(0)
# Judge status: Wrong Answer
n = int(input())

res = 0
for i in range(1, n):
    if i % 3 != 0 and i % 5 != 0:
        res += i
print(res)
# Judge status: Accepted
d=int(input())
C=[int(i) for i in input().split()]
s=[[int(i) for i in input().split()] for q in range(d)]

sco=0
L=[0 for i in range(26)]
ans=[]

#calc
for i in range(d):
    mayou=0
    est=s[i][0]+C[0]*(i+1-L[0])
    for p in range(1,26):
        if s[i][p]+C[p]*(i+1-L[p]) > est:
            mayou=p
            est=s[i][p]+C[p]*(i+1-L[p])
    ans.append(mayou)
    print(mayou+1) #output
# Judge status: Accepted
n, q = map(int, input().split())
s = input()

counts = [0] * n
cnt = 0
for i in range(1, n):
    if s[i - 1] == 'A' and s[i] =='C':
        cnt += 1
    counts[i] = cnt

for i in range(q):
    l, r = map(lambda x: int(x) - 1, input().split())
    print(counts[r] - counts[l])
# Judge status: Wrong Answer
d,t,s=map(int,input().split())
if d//s<=t:
	print("Yes")
else:
	print("No")
# Judge status: Accepted
import itertools

n = int(input())
ppp = tuple(map(int, input().split()))
qqq = tuple(map(int, input().split()))

p = None
q = None
for i, aaa in enumerate(itertools.permutations(range(1, n+1))):
  if aaa == ppp:
    p = i
  if aaa == qqq:
    q = i

if p > q:
  print(p - q)
else:
  print(q - p)
# Judge status: Accepted
o = input()
e = input()
s = ""
for i in range(len(o)):
    s += o[i]
    try:
        s += e[i]
    except Exception:
        pass

print(s)
# Judge status: Accepted
n = int(input())
print(800*n - n//15*200)
# Judge status: Accepted
s = str(input())

result = 'Yes'

for i in range(len(s)):
  if i%2==0:
    if s[i] == 'L':
      result = 'No'
  else:
    if s[i] == 'R':
      result = 'No'
print(result)
# Judge status: Wrong Answer
a,b = map(int,input().split())
n_list = list(map(int,input().split()))[1:]

for i in range(a-1):
  n_list = set(n_list) ^ set(list(map(int,input().split()))[1:])
  
print(len(n_list))
# Judge status: Accepted
X,Y=map(int, input().split())
if X%Y==0:
  print(-1)
else:
  print(X)
# Judge status: Wrong Answer
a=int(input())
b=int(a//2)
print(b/a)
# Judge status: Accepted
# coding: utf-8
A, B = map(int, input().split())
if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
    print('Possible')
else:
    print('Impossible')
# Judge status: Accepted
x = int(input())
for i in range(1, 10 ** 5):
    i5 = i ** 5
    flag = False
    for j in range(i):
        j5 = j ** 5
        if i5 + j5 == x:
            flag = True
            print(i, -j)
            break
        elif i5 - j5 == x:
            flag = True
            print(i, j)
    if flag:
        break
# Judge status: Accepted
n = int(input())
listA = list(map(int, input().split()))

totalH = 0
for a in listA:
    totalH = a ^ totalH

answerL = []
for a in listA:
    ans = a ^ totalH
    answerL.append(str(ans))

print(" ".join(answerL))
# Judge status: Wrong Answer
N, *A = map(int, open(0).read().split())

C = {}
for a in A:
    if a in C.keys():
        C[a] += 1
    else:
        C[a] = 1
B = list(C.items())
B.sort(key=lambda x: x[0])

ans = B[0][1]
for i in range(1, len(B)-1):
    count = B[i][1]
    if B[i-1][0] == B[i][0]-1:
        count += B[i-1][1]
    if B[i+1][0] == B[i][0]+1:
        count += B[i+1][1]
    ans = max(ans, count)
print(ans)
# Judge status: Accepted
import sys
input = sys.stdin.readline


def f(n, p):
    return 0 if n < 2 else n // p + f(n // p, p)

n = int(input())

answer = f(n // 2, 5) if n % 2 == 0 else 0
print(answer)
# Judge status: Wrong Answer
N = int(input())
l = []
for i in range(N-1):
  c, s, f = map(int, input().split())
  l.append([c, s, f])
  
for i in range(N-1):
  time = l[i][1] + l[i][0]
  for j in range(i+1, N-1):
    if time-l[j][1] >= 0:
      wait = (time-l[j][1]) % l[j][2]
    else:
      wait = l[j][1]
      time = 0
    time += wait + l[j][0]
  print(time)
print(0)
# Judge status: Wrong Answer
N, P = map(int, input().split())
A = list(map(int, input().split()))
even = 0
odd = 0
for i in range(N):
    if A[i]%2==0:
        even += 1
    else:
        odd += 1
if odd>=1 or P==0:
    ans = pow(2,even+odd-1)
else:
    ans = 0
print(ans)
# Judge status: Wrong Answer
n,a,b = map(int, input().split())
m1 = n // (a + b)
m2 = n % (a + b)

if a ==0:
  print(0)
elif a + b >n:
  print(a)
elif a > n:
  print(n)
else:
  if m2 >= a:
    print(m1 * (a +1))
  else:
    print(m1 * a + m2)
# Judge status: Accepted
x = int(input())


for i in range(1,10**5):
    ans = (i*(i+1)//2)
    if ans >= x:
        print(i)
        break
# Judge status: Accepted
r, g, b = input().split()
s = r + g + b
s = int(s)
if s % 4 == 0:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
import math
R = int(input())

l = 2 * R * math.pi

print(l)
# Judge status: Accepted
from decimal import *

l=input().split(' ')
a=int(l[0])
b=Decimal(l[1])

print(int(Decimal(a*b)))
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
print('Yes' if a<b<c or a>b>c else 'No')
# Judge status: Accepted
s = input()
if s[-1] == 's':print(s+'es')
else:print(s+'s')
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))

for i in range(N):
    A[i] -= i + 1

ave = sum(A) // N
ans = 0
for a in A:
    ans += abs(a - ave)

print(ans)
# Judge status: Accepted
A, B, N = list(map(int, input().split()))

if B-1 <= N:
    x = B-1
else:
    x = N

ans = (A * x // B) - (A * (x//B))
print(ans)
# Judge status: Accepted
l = [int (x) for x in input().split()]
list.sort (l)
print (l[-1]*10+l[0]+l[1])
# Judge status: Accepted
n,k = map(int,input().split())
total = 0
for i in range(k,n+2):
    m = i*(i-1)//2
    M = i*n-(i*(i-1))//2
    total += M - m + 1
print(total % (10**9 + 7))
# Judge status: Wrong Answer
a, b = map(float, input().split())
c = a * b
print(int(c))
# Judge status: Wrong Answer
S = input()
T = input()
count = 0
for i in range(len(S)):
  if S[i] == T[i]:
    count += 1
print(count)
# Judge status: Accepted
N = int(input())
A = [int(_) for _ in input().split()]
ans = 0
AA = A + A
AA.sort(reverse=True)

# sumする
for i in range(1, N):
    ans += AA[i]

print(ans)
# Judge status: Wrong Answer
c = input()
C = input()

if c[0] == C[-1] and c[-1] == C[0]:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
S=input()
left=int(S[:2])
right=int(S[2:])
mmyy,yymm=False,False
if 12>=left and left>=1:
    mmyy=True
if 12>=right and right>=1:
    yymm=True

if mmyy==True and yymm==False:
    print('MMYY')
elif mmyy==False and yymm==True:
    print('YYMM')
elif mmyy==True and yymm==True:
    print('AMBIGUOUS')
else:
    print('NA')
# Judge status: Accepted
import sys
import math
import bisect

def solve(k, x):
    B = []
    l = max(-1000000, x - k + 1)
    r = min(1000000, x + k - 1)
    for i in range(l, r + 1):
        B.append(i)
    return B

def main():
    k, x = map(int, input().split())
    ans = solve(k, x)
    print(' '.join(list(str(a) for a in ans)))

if __name__ == "__main__":
    main()
# Judge status: Accepted
print('YNeos'[int(input())%9>0::2])
# Judge status: Accepted
N, M = map(int, input().split())
A = []
B = []
for i in range(M):
  a, b = map(int, input().split())
  if a == 1:
    A.append(b)
  if b == N:
    B.append(a)
C = list(set(A) & set(B))
ans = 'IMPOSSIBLE'
if len(C) > 0:
  ans = 'POSSIBLE'
print(ans)
# Judge status: Wrong Answer
n = list(map(int, input()))
count = [0 for _ in range(10)]
for i in n:
    count[i] += 1
if max(count) >= 3:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
s = int(input())
if s != 0:
  print("1");
else:
  print("0");
# Judge status: Accepted
# A - Right Triangle
# https://atcoder.jp/contests/abc116/tasks/abc116_a

ab, bc, ca = map(int, input().split())

result = int(ab * bc * 0.5)
print(result)
# Judge status: Accepted
n=int(input())
a=[0]+[int(x) for x in input().split()]
boal=[0]*(n+1)
m=0
ans=[]
for i in range(n,0,-1):
    k=1
    sum_boal=0
    while i*k<n+1:
        sum_boal+=boal[i*k]
        k+=1
    if sum_boal%2!=a[i]:
        boal[i]+=1
        m+=1
        ans.append(i)
print(m)
print(*ans)