Harryxun/stf_run huggingface dataset:
while True:
  try:
    q = map(int,raw_input().split(" "))
    y = (-1*q[0]*q[5] + q[2] * q[3]) / (-1*q[0] * q[4] + q[1] * q[3])
    x = (q[5]-q[4]* y)/ q[3]

    if x == -0 or  y == -0 : 
      x == 0   
      y == 0
    print "%.3f %.3f" % (x,y)
  except EOFError:
    break

### FIXED CODE ###

while True:
    try:
        x = map(float, raw_input().split(" "))
        a = (x[2]*x[4]-x[1]*x[5])/(x[0]*x[4]-x[1]*x[3])
        b = (-x[3]*x[2]+x[0]*x[5])/(x[0]*x[4]-x[1]*x[3])
         
        if a == -0: a = 0
        if b == -0: b = 0
         
        print "%.3f %.3f" % (a, b)
     
    except EOFError:
        break
def use_fast_io():
    global input
    import io
    import sys
    f = io.BytesIO(sys.stdin.buffer.read())
    input = f.readline


use_fast_io()

from scipy.sparse.csgraph import floyd_warshall
import numpy as np


def solve():
    n, m, l = map(int, input().split())
    graph = np.full((n, n), 10 ** 10)
    for _ in range(m):
        s, t, w = map(int, input().split())
        if w <= l:
            graph[s - 1][t - 1] = graph[t - 1][s - 1] = w
    graph = floyd_warshall(graph, directed=False)
    graph = floyd_warshall(graph <= l, directed=False)
    graph[np.isinf(graph)] = 0
    Q = int(input())
    ans = []
    for _ in range(Q):
        s, t = map(int, input().split())
        ans.append(int(graph[s - 1][t - 1]) - 1)
    print(*ans, sep='\n')


solve()

if __name__ == '__main__':
    solve()


### FIXED CODE ###


from scipy.sparse.csgraph import floyd_warshall
import numpy as np

N, M, L = map(int, input().split())
graph = np.full((N, N), 10 ** 10)
for _ in range(M):
    s, t, w = map(int, input().split())
    if w <= L:
        graph[s - 1][t - 1] = graph[t - 1][s - 1] = w
graph = floyd_warshall(graph, directed=False)
graph = floyd_warshall(graph <= L, directed=False)
graph[np.isinf(graph)] = 0

Q = int(input())
ans = []
for _ in range(Q):
    s, t = map(int, input().split())
    ans.append(int(graph[s - 1][t - 1]) - 1)
print(*ans, sep='\n')
h,w=map(int,input().split())
ans=[]
ans.append('#'*(w+2))
for i in range(h):
  a=list(map(int,input().split()))
  a.insert(0,'#')
  a.append('#')
  ans.append("#")
ans.append('#'*(w+2))
for i in ans:
  print(''.join(i))

### FIXED CODE ###

h,w=map(int,input().split())
ans=[]
ans.append(['#']*(w+2))
for i in range(h):
  a=list(input().split())
  a.insert(0,'#')
  a.append('#')
  ans.append(a)
ans.append(['#']*(w+2))
for i in ans:
  print(''.join(i))
N, M = list(map(int, input().split()))
a_list = sorted(list(map(int, input().split())))
b_c_list = []
for _ in range(M):
    b, c = list(map(int, input().split()))
    b_c_list.append((b, c))
b_c_list = sorted(b_c_list, key=lambda x: x[1], reverse=True)

def b_c_gen():
    for b, c in b_c_list:
        for _ in range(b):
            yield c

total = 0
for i, c in enumerate(b_c_gen()):
    if a_list[i] >= c:
        i -= 1
        break
    total += c
i += 1

if i < N:
    total += sum(a_list[i:])
print(total)


### FIXED CODE ###

N, M = list(map(int, input().split()))
a_list = sorted(list(map(int, input().split())))
b_c_list = []
for _ in range(M):
    b, c = list(map(int, input().split()))
    b_c_list.append((b, c))
b_c_list = sorted(b_c_list, key=lambda x: x[1], reverse=True)

def b_c_gen():
    for b, c in b_c_list:
        for _ in range(b):
            yield c

total = 0
for i, c in enumerate(b_c_gen()):
    if i >= N:
        break
    if a_list[i] >= c:
        i -= 1
        break
    total += c
i += 1

if i < N:
    total += sum(a_list[i:])
print(total)
x=int(input())
count=0
for i in range(1,x**2):
    count+=i
    if count>=x:
        break
print(i)


### FIXED CODE ###

x=int(input())
count=0
for i in range(1,x**2+3):
    count+=i
    if count>=x:
        break
print(i)
# coding:utf-8
abc =input().split()
a,b,c= int(abc[0]),int(abc[1]),int(abc[2])

if a+b == c:
  print("+")
  if a-b == c:
    print("?")
elif a-b == c:
  print("-")
else:
  print("!")

### FIXED CODE ###

#coding:utf-8

a = int(input())
i=0
while i*i <= a:
  i=i+1

i=i-1

print(i*i)
m = 100
quota = int(input())
cnt = 0
while(m<=quote):
  m = int(m*1.01)
  cnt += 1
  
print(cnt)

### FIXED CODE ###

m = 100
quota = int(input())
cnt = 0
while(True):
    if m >= quota:
        print(cnt)
        exit()
    m = int(m*1.01)
    cnt += 1
import re

t = re.search(r"(\d{1,3})\s(\d{1,3})", input(""))

a = t.group(1)
b = t.group(2)

x = a * b
y = a*2 + b*2

print(x,y)

### FIXED CODE ###

a, b =map(int, input().split())
print(a*b,2*(a+b))
N = int(input())
S = input()
K = int(input())
for i in range(N):
  if S[i] != S[K]:
    S[i] = "*"
print(S)

### FIXED CODE ###

N = int(input())
S = list(input())
K = int(input())
for i in range(N):
  if S[i] != S[K-1]:
    S[i] = "*"
print("".join(S))
n=int(input())
a=list(map(int,input().split()))
a.sort()
ans=0
for i in range(n):
  ans+=abs(a[i])
print(ans)
plus=list()
minus=list()
for i in range(n):
  if a[i]>=0:
    plus.append(a[i])
  else:
    minus.append(a[i])
while len(plus)>=2 :
  p=plus.pop(0)
  m=minus.pop(0)
  minus.append(m-p)
  print(str(m)+' '+str(p))
while len(minus)>0:
  p=plus.pop(0)
  m=minus.pop(0)
  plus.append(p-m)
  print(str(p)+' '+str(m))

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort()
xy=[]
for i in range(n-2,0,-1):
  y=a[i]
  if y>0:
    x=a[0]
    a[0]-=y
  else:
    x=a[n-1]
    a[n-1]-=y
  xy.append((x,y))
print(a[n-1]-a[0])
xy.append((a[n-1],a[0]))
print('\n'.join([' '.join(map(str,t)) for t in xy]))
import math

pi=math.pi
a,b,x=map(int,input().split())
if 2*x<a*a*b:
  c=(2*x)/(a*b)
  print(math.degrees(math.atan(b/c)))
else:
  x=a*a*b-x
  c=(2*x)/(a*a)
  print(90-math.degrees(math.atan(a/c)))

### FIXED CODE ###

import math

pi=math.pi
a,b,x=map(int,input().split())
if x==a*a*b:
  print(0)
elif 2*x<a*a*b:
  c=(2*x)/(a*b)
  print(math.degrees(math.atan(b/c)))
else:
  x=a*a*b-x
  c=(2*x)/(a*a)
  print(90-math.degrees(math.atan(a/c)))
import sys
input=sys.stdin.readline
n,a=map(int,input().split())
x=[0]+list(map(int,input().split()))
su=sum(x)
maxi=max(x)
dp=[[[0 for k in range(su+1)] for j in range(51)] for i in range(51)]
dp[0][0][0]=1
for i in range(1,n+1):
    for j in range(i+1):
        for k in range(maxi*j+1):
            if k<x[i]:
                dp[i][j][k]=dp[i-1][j][k]
            if k>=x[i] and j>=1:
                dp[i][j][k]=dp[i-1][j][k]+dp[i-1][j-1][k-x[i]]
ans=0
for t in range(1,n+1):
    if a*t<=su:
        ans+=dp[n][t][a*t]
    else:
        break
print(ans)


### FIXED CODE ###

import sys
input=sys.stdin.readline
n,a=map(int,input().split())
x=[0]+list(map(int,input().split()))
su=sum(x)
maxi=max(x)
dp=[[[0 for k in range(maxi*n+1)] for j in range(51)] for i in range(51)]
dp[0][0][0]=1
for i in range(1,n+1):
    for j in range(i+1):
        for k in range(maxi*j+1):
            if k<x[i]:
                dp[i][j][k]=dp[i-1][j][k]
            if k>=x[i] and j>=1:
                dp[i][j][k]=dp[i-1][j][k]+dp[i-1][j-1][k-x[i]]
ans=0
for t in range(1,n+1):
    if a*t<=su:
        ans+=dp[n][t][a*t]
    else:
        break
print(ans)
from collections import Counter
n = input()
arr = map(int,raw_input().split())
c = Counter(arr)
li = []
for i in c:
	if c[i] >= 2:
		li.append(i)
li.sort()
print li[-1]*li[-2]


### FIXED CODE ###

'''input
4
1 2 3 4
'''
from collections import Counter
n = input()
arr = map(int,raw_input().split())
c = Counter(arr)
li = []
for i in c:
	if c[i] >= 2:
		li.append(i)
li.sort()
if len(li) == 0:
	print "0"
elif len(li) == 1:
	print li[-1]**2
else:
	if c[li[-1]] >= 4:
		print li[-1]**2
	else:
		print li[-1]*li[-2]
x,y = map(int,input().split())
min = 2019
n = y-x
i=0
while(i<n):
  s = (x + i) % 2019
  i = i +1
  if s == 0:
    print(s)
    break
  elif min > s:
    min = s:
min2 = 2019
j=0
while(j<n):
  g = (x + j) % 2019
  j=j+1
  if g == 0:
    break
  elif min2 > g and g == s:
    min2 =g

if s != 0:
  z = (s*g)%2019
  print(z)


### FIXED CODE ###

l, r = map(int, input().split())

min = 2019

for i in range(l, r+1):
    for j in range(i+1, r+1):
        p = (i % 2019)*(j % 2019) % 2019
        if p < min:
            min = p

        if min == 0:
            print("0")
            exit()

print(min)
from fractions import gcd
n=int(input())
a=list(map(int,input().split()))
b=[]
if n==2:
  print(max(a))

else:
  for i in range(n-1):
    x=a[i]
    y=a[i+1]
    b+=list(gcd(x,y))
  b+=list(gcd(a[0],a[-1]))
  b.sort()
  print(b[2])


### FIXED CODE ###

import math

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

def segfunc(x, y):
    return math.gcd(x,y)

def init(init_val):
    # set_val
    for i in range(n):
        seg[i+num-1] = init_val[i]
    # built
    for i in range(num-2, -1, -1):
        seg[i] = segfunc(seg[2*i+1], seg[2*i+2])

def update(k, x):
    k += num - 1
    seg[k] = x
    while k:
        k = (k-1)//2
        seg[k] = segfunc(seg[2*k+1], seg[2*k+2])

def query(p, q):
    if q <= p:
        return ide_ele
    p += num - 1
    q += num - 2
    res = ide_ele
    while q-p>1:
        if p&1 == 0:
            res = segfunc(res, seg[p])
        if q&1 == 1:
            res = segfunc(res, seg[q])
            q -= 1
        p = p//2
        q = (q-1)//2
    if p == q:
        res = segfunc(res, seg[p])
    else:
        res = segfunc(segfunc(res, seg[p]), seg[q])
    return res

# identity element
ide_ele = 0

# num: n以上の最小の2のべき乗
num = 2**(n-1).bit_length()
seg = [ide_ele]*2*num

a=init(a)

ans=1
for i in range(n):
    ans=max(ans,math.gcd(query(0,i),query(i+1,n)))


print(ans)
import math

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


dic = {i+1: [] for i in range(int((N*M) / math.gcd(N,M)))}
L = len(dic)
ans = L

for n in range(N):
  k = int(n*(L/N))+1
  #print(k)
  dic[k].append(S[n])

#print(dic)
for m in range(M):
  k = int(m * (L/M) + 1)
  if len(dic[k]) == 0:continue
  else: 
    #print(T[m],dic[k])
    if dic[k][0] != T[m]:
      ans = -1
      break


print(ans)


### FIXED CODE ###

from fractions import gcd

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

dic = {}
L = int((N*M) / gcd(N,M))
ans = L

for i in range(N):
  dic[int(i*(L/N)+1)] = i

key = set(dic.keys())
for i in range(M):
  if i*(L/M)+1 in key:
    if S[dic[int(i*(L/M)+1)]] == T[i]:continue
    else: 
      ans = -1
      break

  


print(ans)
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
n,a,b,c,d = map(int,input().split())
s = input()
a -= 1
b -= 1
c -= 1
d -= 1
truth = [[0 for i in range(n)],[0 for j in range(n)]]

def solve(now,dest):
    for i in  range(now,dest):
        if s[i] == '#' and s[i+1] == '#':
            return False
    return True
if c < d:
    if solve(a,c,0) and solve(b,d,1):
        print('Yes')
    else:
        print('No')

else:
    q = False
    for i in range(b,d):
        if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
            q = True
            break
        if s[i-1] == '#' and s[i] == '#':
            print('No')
            exit()
    if q and solve(a,c,0) and solve(b,d,1):
        print('Yes')
    else:
        print('No')

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
n,a,b,c,d = map(int,input().split())
s = input()
a -= 1
b -= 1
c -= 1
d -= 1
truth = [[0 for i in range(n)],[0 for j in range(n)]]

def solve(now,dest):
    for i in  range(now,dest):
        if s[i] == '#' and s[i+1] == '#':
            return False
    return True
if c < d:
    if solve(a,c) and solve(b,d):
        print('Yes')
    else:
        print('No')

else:
    q = False
    for i in range(b,d+1):
        if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
            q = True
            break
    if q and solve(a,c) and solve(b,d):
        print('Yes')
    else:
        print('No')
from collections import defaultdict
from collections import deque

N, K = map(int, input().split())
ab = defaultdict(list)
for i in range(N-1):
    a, b = map(int, input().split())
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)

MOD = 10**9+7


def dfs(v, pv, n):
    k = K-1 if pv == -1 else K-2
    a = 1
    for u in ab[v]:
        if u != pv:
            a *= dfs(u, v, k)
            k -= 1
    return a*n % MOD


print(dfs(0, -1, K))


### FIXED CODE ###

from collections import defaultdict
from collections import deque
import sys
sys.setrecursionlimit(10**6)

N, K = map(int, input().split())
ab = defaultdict(list)
for i in range(N-1):
    a, b = map(int, input().split())
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)

MOD = 10**9+7


def dfs(v, pv, n):
    k = K-1 if pv == -1 else K-2
    a = 1
    for u in ab[v]:
        if u != pv:
            a *= dfs(u, v, k)
            a %= MOD
            k -= 1
    return a*n % MOD


print(dfs(0, -1, K))
S = input()
print("x"*S.count())

### FIXED CODE ###

S = input()
print("x" * len(S))
def check_other(tmp_i, cur_p, cur_q, cur_x, cur_y, tmp_count):
    for i in range(len(p)):
        if i in tmp_i:
            continue

        tmp_p = p[i][0] - cur_x
        tmp_q = p[i][1] - cur_y

        if tmp_p == cur_p and tmp_q == cur_q:
            tmp_i.append(i)

            tmp_count += 1
            tmp_count = check_other(tmp_i, cur_p, cur_q, p[i][0], p[i][1], tmp_count)


    return tmp_count





if __name__ == "__main__":
    #入力取得
    N = int(input())

    p = []


    for i in range(N):
        l = list(map(int, input().split()))
        p.append(l)

    min_cost = N

    results = []

    counts = []

    for j in range(len(p)):
        for i in range(len(p)):
            tmp_i = [i]
            tmp_count = 0
            if i == 0:
                continue

            tmp_p = p[i][0] - p[j][0]
            tmp_q = p[i][1] - p[j][1]



            tmp_count = check_other(tmp_i, tmp_p, tmp_q, p[i][0], p[i][1], tmp_count)


            counts.append(tmp_count)




tmp_max = max(counts)

if N == 2:
    result = 1
elif tmp_max == 0:
    result = N - 2
else:
    result = N - tmp_max - 1
#
print(result)


### FIXED CODE ###

n = int(input())
a = [tuple(map(int,input().split())) for i in range(n)]

m = dict()


ans = 0


for i in range(n):
    for j in range(n):
        if i !=j:
            x = a[i][0] - a[j][0]
            y = a[i][1] - a[j][1]

            p = (x,y)

            if p not in m:
                m[p] = 0

            m[p] += 1

            ans = max(m[p], ans)



print(n-ans)
W, H, x, y, r = map(int, input().split())
if x >= r and x + r <= W and y >= r and  y + r <= H
  print("Yes")
else :
  print("No")



### FIXED CODE ###

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

a = x+r
b = y+r
c = x-r
d = y-r

if a<=W and b<=H and c>=0 and d>=0:
    print("Yes")
else:
    print("No")
S = input()
T = input()
 
count = 0
for i in range(S):
  if S[i] != T[i]:
    count +=1

print(count)
    
 


### FIXED CODE ###

S = input()
T = input()
count = 0
j =0
for i in S:
  if i != T[j]:
    count +=1
  j+=1

print(count)
n,m=map(int,input().split())
p=[[]for _ in range(n)]
c=[0]*n
for i in range(m):
    x,y=map(int,input().split())
    p[x-1].append(y-1)
from functools import lru_cache
@lru_cache(maxsize = None)
def l(k):
    return max([l(i)for i in p[k]]+[0])+1
print(max([l(i)for i in range(n)])-1)

### FIXED CODE ###

n,m=map(int,input().split())
p=[[]for _ in range(n)]
c=[0]*n
import sys
sys.setrecursionlimit(10**6)
for i in range(m):
    x,y=map(int,input().split())
    p[x-1].append(y-1)
from functools import lru_cache
@lru_cache(maxsize=n)
def l(k):
    return max([l(i)for i in p[k]]+[0])+1
print(max([l(i)for i in range(n)])-1)
print(A*B)

### FIXED CODE ###

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

print(A*B)
S = str(input())
l = list(S)
s = int(len(S))

num = 0
for i in range(s):
    if l[i] == l[i+1]:
        num += 1
    else:
        num += 0

if num == 0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

S = str(input())
l = list(S)

for i in range(len(S)-1):
    if l[i] == l[i+1]:
        print("Bad")
        break
else:
     print("Good")
n,k=map(int,input().split())
p=list(map(int,input().split()))
p.sort()
if n>k:
    s=p[0]+p[1]+p[2]
    print(s)
    exit()

if n==k:
    print(sum(p))


### FIXED CODE ###

n,k=map(int,input().split())
p=list(map(int,input().split()))
p.sort()
if n==k and k==len(p):
        print(sum(p))
        exit()

if n>k:
    s=0
    for i in range(k):
        s+=p[i]
        
print(s)
a,b,k=map(int,input().split())
if a-b<=c:
  for i in range[a:b]:
    print(i)
else:
  for i in range[a:a+c-1]:
     for y in range[b-c+1:b]:
        print(i)
        print(y)

### FIXED CODE ###

a,b,k=map(int,input().split())
if b-a+1<=k*2:
  for i in range(a,1+b):
    print(i)
else:
  for i in range(a,a+k):
    print(i)
  for y in range(b-k+1,b+1):
    print(y)
N,Q=map(int,input().split())
s=[0]*N
tree=[[] for _ in range(N)]
counter=[0]*N
def pl(t,x):
    if t:
        for i in t:
            s[i]+=x
            pl(tree[i],x)
for _ in range(N-1):
    a,b=map(int, input().split())
    tree[a-1].append(b-1)
for _ in range(Q):
    p,x=map(int, input().split())
    s[p-1]+=x
    pl(tree[p-1],x)
s=list(map(str, s))
print(' '.join(s))


### FIXED CODE ###

from collections import deque

N,Q=map(int,input().split())
to=[[] for _ in range(N)]
count=[0]*N
for _ in range(N-1):
    a,b=map(int, input().split())
    to[a-1].append(b-1)
    to[b-1].append(a-1)
for _ in range(Q):
    p,x=map(int, input().split())
    count[p-1]+=x
q = deque()
q.append(0)
p=[True]*N
while q:
    i = q.pop()
    if p[i]:
        p[i]=False
        for j in to[i]:
            if p[j]:
                count[j]+=count[i]
                q.append(j)
print(*count)
import math
import sympy


def main():
    n = int(input())

    dp = [0] * (n+1)
    dp[0] = 0
    dp[1] = 0
    for i in range(2, n+1):
        dp[i] = dp[i-1] + sympy.divisor_count(i-1)

    print(dp[-1])


if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    n = int(input())
    ans = 0
    for a in range(1, n):
        ans += (n-1) // a
    print(ans)

if __name__ == '__main__':
    main()
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    res = 0
for x in ls:
    res *= x
    if res > 10**18:
        res = -1
     	break
print(res)

### FIXED CODE ###

n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)
from sys import stdin
import collections

N = int(input())

xlist=[]
ylist=[]
for i in range(N):
  x, y = map(int, stdin.readline().rstrip().split())
  xlist.append(x)
  ylist.append(y)

tupleList=[]
for i in range(N):
  for j in range(N):
    if i < j:
      tupleList.append((xlist[i] - xlist[j], ylist[i] - ylist[j]))

c = collections.Counter(tupleList)
print(N-c[max(c)])

### FIXED CODE ###

from sys import stdin

N=int(input())
xlist=[]
ylist=[]
dict = {}
for i in range(N):
  x, y = map(int, stdin.readline().rstrip().split())
  xlist.append(x)
  ylist.append(y)

for i in range(N):
  for j in range(N):
    if i != j:
      tupleStr=str(xlist[i] - xlist[j])+","+str(ylist[i] - ylist[j])
      if tupleStr in dict:
        dict[tupleStr]+=1
      else:
        dict[tupleStr]=1

maxNum=0
for val in dict.values():
  maxNum = max(maxNum, val)

print(N-maxNum)
import sys
sys.setrecursionlimit(5000)
n = int(input())
X = input()
pc = X.count('1')
nx = int(X, 2)
dp = [-1] * ((2*10**5)+1)
def f(n):
    if dp[n] > 0:
        return dp[n]
    pc = bin(n).count('1')
    nn = n%pc
    if nn == 0:
        return 1
    dp[n] = f(nn) + 1
    return dp[n]

for i in range(n-1, -1, -1):
    # ibit目を反転させる # つまりi**2を引く
    tmp = pow(2, i)
    if (nx>>i)&1:
        r = (nx-tmp)%(pc-1)
        if r > 0:
            print(f(r) + 1)
        else:
            print(1)
    else:
        r = (nx+tmp)%(pc+1)
        if r > 0:
            print(f(r) + 1)
        else:
            print(1)

### FIXED CODE ###

n = int(input())
X = input()
pc = X.count('1')
nx = int(X, 2)

def f(n):
    c = 0
    while n > 0:
        n %= bin(n).count('1')
        c += 1
    return c

nxp = nx%(pc+1)
nxm = nx%(pc-1) if pc > 1 else 0
for i in range(n-1, -1, -1):
    if (nx>>i)&1:
        # 2**iを引く
        if pc-1 == 0:
            print(0)
            continue
        p = pow(2, i, pc-1)
        r = (nxm-p)%(pc-1)
    else:
        # 2**iを足す
        r = (nxp+pow(2, i, pc+1))%(pc+1)

    print(f(r) + 1)
import math

for n in range(200):
    nums = list(map(int, input().split()))
    a=int(1.0+math.log(nums[0],10))+int(1.0+math.log(nums[1],10))
    print(a)

### FIXED CODE ###

import math
import sys

for line in sys.stdin:
    words=line.strip().split(" ")
    a=int(words[0])
    b=int(words[1])
    c=a+b
    if c!=0:
        print(int(1.0000001+math.log(c,10)))
    else:
        print(1)
import numpy as np
N, D = map(int, input().split())
X = np.zeros((N,D))
for i in range(N):
  X[i][:] = list(map(int, input().split()))

n = 0
for i in range(N):
  for j in range(i+1, N):
    dist = linalg.norm(X[i]-X[j])
    if dist.is_integer():
      n += 1

print(n)

### FIXED CODE ###

import numpy as np
N, D = map(int, input().split())
X = np.zeros((N,D))
for i in range(N):
  X[i][:] = list(map(int, input().split()))

n = 0
for i in range(N):
  for j in range(i+1, N):
    dist = np.linalg.norm(X[i]-X[j])
    if dist.is_integer():
      n += 1

print(n)
N = int(input())
H = list(map(int,input().split()))

sabun = [H[i+1]-H[i] for i in range(N-1)]
sei = [i+1 for i in range(N-1) if sabun[i] <= 0]
if N == 1:
    print("0")
    exit()
if min(sabun) >= 0:
    print("0")
    exit()

sa = [sei[i+1]-sei[i] for i in range(len(sei)-1)]
sa.append(0)
index = [i+1 for i in range(len(sa)) if sa[i] != 1]
ans = [index[i+1]-index[i] for i in range(len(index)-1)]
# print(sabun)
# print(sei)
# print(sa)
# print(index)
print(max(ans))


### FIXED CODE ###


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

sabun = [H[i+1]-H[i] for i in range(N-1)]
sei = [i+1 for i in range(N-1) if sabun[i] <= 0]

# print(sabun)
# print(sei)

if N == 1:
    print("0")
    exit()
if min(sabun) > 0:
    print("0")
    exit()

sa = [sei[i+1]-sei[i] for i in range(len(sei)-1)]
sa.append(0)
sa.insert(0,0)
index = [i for i in range(len(sa)) if sa[i] != 1]
ans = [index[i+1]-index[i] for i in range(len(index)-1)]

# print(sa)
# print(index)
if ans == []:
    print(N-1)
    exit()
print(max(ans))
n = int(input())
a = int(input())
if n%500<=a:
    plint("Yes")
else:
    print("No")

### FIXED CODE ###

n = int(input())
a = int(input())
if n%500<=a:
    print("Yes")
else:
    print("No")
import collections

N = int(input())
W = []
jud = 1

for _ in range(N):
    W.append(input())

c = collections.Counter(W)
ct = len(c)

for i in range(N-1):
    fst = W[i]
    fnl = W[i+1]
    if fst[-1] == fnl[1]:
        jud = 0

if ct != N:
    print("No")
elif jud == 0:
    print("No")
else: print("Yes")

### FIXED CODE ###

N = int(input())
ketu = ""
mozi = []
frag = 0
for i in range(N):
    stri = input()
    if (ketu != "" )and(ketu != stri[0]):
        frag = 1

    ketu = stri[-1]
    mozi.append(stri)

if frag == 1:
    print("No")
    exit()

if len(mozi) != len(list(set(mozi))):
    print("No")
    exit()

print("Yes")
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))

res = 0
for i in range(N):
    a = V[i] - C[i]
    if a > 0:
        res = res + a
    else:
        pass

print(res)



### FIXED CODE ###

input = input().split()
A = int(input[0])
B = int(input[1])
T = int(input[2])


print((T//A)*B)
n, m = map(int, input().split())
dat_a = []
dat_b = []
for i in range(n):
    dat_a.append(input())
for i in range(m):
    dat_b.append(input())

for i in range(n - m):
    t = True
    for j in range(n - m):
        for k in range(m):
            if dat_a[i+ k][j:j+m] != dat_b[k]:
                t = False
                continue
    if t:
        break
print("Yes" if t else "No")

### FIXED CODE ###

n, m = map(int, input().split())
dat_a = []
dat_b = []
for i in range(n):
    dat_a.append(input())
for i in range(m):
    dat_b.append(input())

if n == 1 and m == 1:
    if dat_a[0][0] == dat_b[0][0]:
        t = True
    else:
        t = False

for i in range(n - m + 1):
    for j in range(n - m + 1):
        for k in range(m):
            #print(dat_a[i + k][j : j + m])
            if dat_a[i + k][j : j + m] != dat_b[k]:
                t = False
                break
            t = True
        if t:
            break
    if t:
        break

print("Yes" if t else "No")