Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0141

"""
import sys
from sys import stdin
input = stdin.readline
from itertools import cycle


def guruguru(n):
    if n < 5:
        return

    line = 0
    dirs = cycle([(0, -1), (1, 0), (0, 1), (-1, 0)])

    M = [[' '] * n for _ in range(n)]
    cx = 0
    cy = n - 1

    while line < n:
        line += 1
        dx, dy = dirs.__next__()
        while True:
            M[cy][cx] = '#'
            nx = cx + dx
            ny = cy + dy
            nnx = nx + dx
            nny = ny + dy

            if nx < 0 or nx >= n:
                break
            if ny < 0 or ny >= n:
                break
            if nny < 0 or nny >= n or nnx < 0 or nnx >= n:
                pass
            else:
                if M[nny][nnx] != ' ':
                    break
            cx = nx
            cy = ny

    for l in M:
        print(''.join(map(str, l)))


def main(args):
    for line in sys.stdin:
        n = int(line)
        guruguru(n)


if __name__ == '__main__':
    main(sys.argv[1:])
    

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0141

"""
import sys
from sys import stdin
input = stdin.readline


M = []
def guruguru(n):
    global M
    dirs = [(0, -1), (1, 0), (0, 1), (-1, 0)] #  x, y???????????? (???????????????????????????)

    M = [[' '] * n for _ in range(n)] #  ??????????????¨?????????????????§?????????
    cx = 0                      #  ??????????????°???
    cy = n - 1
    line = 0                    #  ???????????§??????????????????n??¨???????????°??????????????¨??????

    while line < n:
        dx, dy = dirs[line % 4]
        line += 1
        while True:
            M[cy][cx] = '#'

            nx = cx + dx        #  ?¬???????????????¨???????????????
            if not 0 <= nx < n: #  ??????????????????????????????????????§???????????¢?????????
                break
            ny = cy + dy
            if not 0 <= ny < n:
                break
                
            nnx = nx + dx       #  ?¬?????¬???????????????¨???????????????
            nny = ny + dy
            if 0 <= nny < n and 0 <= nnx < n:
                if M[nny][nnx] != ' ': #  ??????????????????????????????????????¢??????????????????????????£??????????????´??????????????¢?????????
                    break
            cx = nx
            cy = ny

    # ?????????????????????????????????
    for l in M:
        print(''.join(l))


def main(args):
    n = int(input())
    for i in range(n):
        size = int(input())
        guruguru(size)
        if i != (n - 1):        #  ????????\?????????????????????????????????????????\??????
            print()


if __name__ == '__main__':
    main(sys.argv[1:])
k = int(input()
a, b=map(int, input().split())

c=0
for i in range(a, b+1):
	if i%k == 0:
        c += 1
if c == 0:
	print("NG")
else:
    print("OK")

### FIXED CODE ###

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

c=0
for i in range(a, b+1):
  if i%k == 0:
    c += 1
  else:
    pass    
if c == 0:
  print("NG")
else:
  print("OK")
from functools import reduce
from operator import mul

mod = 10**9 + 7

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

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

if N == K:
    print(reduce(mul, A)%mod)

else:

    AP = []
    AM = []
    for i in A:
        if i < 0:
            AM.append(-abs(i)%mod)
        else:
            AP.append(i%mod)
            
    if len(AP) == 0 and K%2 != 0:
        AM.sort(reverse=True)
        AM = AM[:K]
        print(reduce(mul, AM)%mod)

    else:
        
        AP.sort(reverse=True)
        AM.sort()
        
        ans = 1
        p = 0
        m = 0
        cnt = 0
        while True:
            if (K - cnt) == 1:
                ans *= AP[p]
                print(ans%mod)
                break
                
            elif 2 <= (len(AM) - m) and 2 <= (len(AP) - p):   
                if AP[p]*AP[p+1] >= AM[m]*AM[m+1]:
                    ans *= (AP[p]*AP[p+1])
                    p += 2
                    cnt += 2
                
                else:
                    ans *= (AM[m]*AM[m+1])
                    m += 2
                    cnt += 2 
                    
            elif 1 >= (len(AP) - p) and 2 <= (len(AM) - m):
                ans *= (AM[m]*AM[m+1])
                m += 2
                cnt += 2 
            
            elif 2 <= (len(AP) - p) and 1 >= (len(AM) - m):
                ans *= (AP[p]*AP[p+1])
                p += 2
                cnt += 2
            
            

            if cnt == K:
                print(ans%mod)
                break


### FIXED CODE ###

from bisect import bisect_left,bisect_right
p=10**9+7
n,k=map(int,input().split())
a=sorted(list(map(int,input().split())))
pi=1
ni=0
ans=1
i=0
while i<k-1:
  if a[ni]*a[ni+1]>a[-pi]*a[-pi-1]:
    ans=ans*a[ni]*a[ni+1]%p
    ni+=2
    i+=2
  else:
    ans=ans*a[-pi]%p
    pi+=1
    i+=1
if i==k-1:
  ans=ans*a[-pi]%p
if a[-1]<0 and k%2==1:
  ans=1
  for i in a[n-k:]:
    ans=ans*i%p
print(ans)
n = int(input())
guzai_valu = list(map(int, input().split()))
heikin=0
i=1
while i <= n-1:
   guzai_valu_sort = sorted(guzai_valu)
   #print(guzai_valu_sort)
   heikin=(guzai_valu_sort.pop(0)+guzai_valu_sort.pop(0))/2
   #自動で成分がずれるのでリストの成分の内最初のものを2回選ぶことが最小のもの
   #を2つ選ぶことと等価になるんや
   #print(heikin)
   guzai_valu_sort.append(heikin)
   guzai_valu = guzai_valu_sort
   i=i+1


print(heikin)


### FIXED CODE ###

x = int(input())
y = input()

if x >= 3200 :
     print(y)

else:
     print('red')
#!/usr/bin/env python3
import sys
import math

def lcm(a: int, b: int):
    return abs(a*b) // math.gcd(a, b)

def nr_divide(a: int, b: int, x: int):
    return (int(math.floor(b/x)) - int(math.ceil(a/x))) + 1

def solve(A: int, B: int, C: int, D: int):
    E = lcm(C, D)
    N = B - A + 1
    nrC = nr_divide(A, B, C)
    nrD = nr_divide(A, B, D)
    nrE = nr_divide(A, B, E)
    print(N - nrC - nrD + nrE)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    solve(A, B, C, D)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
import math
from fractions import gcd

def my_lcm(a: int, b: int):
    return  abs(a*b) // gcd(a, b)

def nr_divide(a: int, b: int, x: int):
    count = b//x - a//x + 1
    if a % x != 0:
        count -= 1
    return count

def solve(A: int, B: int, C: int, D: int):
    E = my_lcm(C, D)
    N = B - A + 1
    nrC = nr_divide(A, B, C)
    nrD = nr_divide(A, B, D)
    nrE = nr_divide(A, B, E)
    count = N - nrC - nrD + nrE
    print(count)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    solve(A, B, C, D)
    return

if __name__ == '__main__':
    main()
n=int(input())
m=int(input())
print((n-1)*(m-1))

### FIXED CODE ###

a,b=map(int,input().split())
print((a-1)*(b-1))
# @Date:   2020-06-06T20:03:11+05:30
# @Filename: A.py
# @Last modified time: 2020-06-06T20:03:11+05:30
"""
~~ Author : Bhaskar
~~ Dated : 06~06~2020
"""

import sys
from bisect import *
from math import floor,sqrt,ceil,factorial as F,gcd,pi
from itertools import chain,combinations,permutations,accumulate
from collections import Counter,defaultdict,OrderedDict,deque
from array import array
INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize)-1
mod = 1000000007
ch = "abcdefghijklmnopqrstuvwxyz"
lcm = lambda a,b : (a*b)//gcd(a,b)
setbit = lambda x : bin(x)[2:].count("1")

def solve():
    s = input()
    o = s.count("o")
    print(700+(o*100))

if __name__ == "__main__":
    try:
        sys.stdin = open("input.txt","r")
    except :
        pass
    solve()


### FIXED CODE ###

s = input()
print(700+s.count("o")*100)
import numpy

l = raw_input().split()

c =((l[0] - 1) * (l[1] - 1))

print(c)

### FIXED CODE ###

a, b = map(int, input().split())
print((a - 1) * (b - 1))
a,b =map(int, input().strip().split())
if a == b:
  s = 2*b
else:
  e = max(a,b)
  s = 2*e - 1
print(e)
  


### FIXED CODE ###

a,b =map(int, input().strip().split())
if a == b:
  s = 2*b
else:
  e = max(a,b)
  s = 2*e - 1
print(s)
n,x = map(int,input().split())

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

dis = 0
i = 0

while dis <= x:
    dis += l[i]
    i += 1

print(i)
    
    

### FIXED CODE ###

n,x = map(int,input().split())

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

cnt = 1
dis = 0

for i in l:
    dis += i
    if dis > x:
        break
    cnt += 1

print(cnt)
candy=sorted(map(int,input().split()))
print("Yes" if candy[0]+candy[1]=candy[2] "No")

### FIXED CODE ###

candy= sorted(map(int,input().split()))
print("Yes" if candy[0]+candy[1]== candy[2] else "No")
S = input()
s = None//初期値
for i in range(len(S)):
  c = S[i]
  if c == "A" and s is None :
    s = i
  if c == "Z":
    e = i
print(e-s+1)


### FIXED CODE ###

S = input()
L = len(S)
for i in range(L):
  c = S[i]
  if c == "A":
    s = i
    break
for i in range(L):
  c = S[-(i+1)]
  if c == "Z":
    e = L - (i+1)
    break
print(e-s+1)
#!/usr/bin/env python
# -*- coding: utf-8 -*-

while True:
    N,M = map(int,input().split())
    if N == 0 and M == 0:
        break
    square_count_w = [0 for i in range(1000*1500+1)]
    square_count_h = [0 for i in range(1000*1500+1)]
    heights = []
    widths = []

    for i in range(N):
        height = int(input())
        square_count_h[height] += 1
        for h in heights[::-1]:
            square_count_h[height+h] += 1
        heights.append(height)

    for i in range(M):
        width = int(input())
        square_count_w[width] += 1
        for w in widths[::-1]:
            square_count_w[width+w] += 1
        widths.append(width)

    ans = 0
    for i in range(1000*1500+1):
        ans += square_count_w[i] * square_count_h[i]

    print(ans)

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import collections

while True:
    N,M = map(int,raw_input().split())
    if N == 0 and M == 0:
        break
    square_count_w = collections.defaultdict(int)
    square_count_h = collections.defaultdict(int)
    heights = []
    widths = []

    for i in range(N):
        height = int(raw_input())
        square_count_h[height] += 1
        sum_h = 0
        for h in heights[::-1]:
            sum_h += h
            square_count_h[height+sum_h] += 1
        heights.append(height)

    for i in range(M):
        width = int(raw_input())
        square_count_w[width] += 1
        sum_w = 0
        for w in widths[::-1]:
            sum_w += w
            square_count_w[width+sum_w] += 1
        widths.append(width)

    ans = 0
    for key,value in square_count_w.items():
        ans += square_count_w[key] * square_count_h[key]

    print(ans)
import math
a,b,c,d = input().split(" ")
a = int(a)
b = int(b)
c = int(c)
d = int(d)
t1 = 30* + 0.5*d
t2 = 6*d
print(t1,t2)
print(sqrt(e))

### FIXED CODE ###

import math
a,b,c,d = input().split(" ")
a = int(a)
b = int(b)
c = int(c)
d = int(d)
t1 = 30*c + 0.5*d
t2 = 6*d
e = math.cos(math.radians(t1-t2))
f = a*a + b*b - 2*a*b*e
print(f ** 0.5)
tot , n = list( map ( int ,input().split()))
a = list( map( int , input().split()))
if tot >= a.sum():
	print(tot -a.sum())
else:
	print(-1)

### FIXED CODE ###

tot , n = list( map ( int ,input().split()))
a = list( map( int , input().split()))
if tot >= sum(a):
	print(tot -sum(a))
else:
	print(-1)
A, B = map(int, input().split())

import math
gcd = math.gcd(A, B)

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

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

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

    return arr

if gcd == 1:
    print(1)
else:
    fact = factorization(gcd) 
    print(len(fact) + 1)

### FIXED CODE ###

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

import fractions
gcd = fractions.gcd(A, B)

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

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

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

    return arr

if gcd == 1:
    print(1)
else:
    fact = factorization(gcd) 
    print(len(fact) + 1)
def resolve():
  H, W = map(int, input().split(" "))
  s = []
  dp = [[0] * W for i in range(H)]
  for _ in range(W):
    s.append([x == "." for x in list(input())])

  for h in range(H):
    for w in range(H):
      if h == 0 and w == 0:
        if not s[0][0]:
          dp[0][0] = 1
      elif h == 0:
        if s[0][w-1] and not s[0][w]:
          dp[0][w] = dp[0][w-1] + 1
        else:
          dp[0][w] = dp[0][w-1]
      elif w == 0:
        if s[h-1][0] and not s[h][0]:
          dp[h][0] = dp[h-1][0] + 1
        else:
          dp[h][0] = dp[h-1][0]
      else:
        # 左側と上側を見て、操作回数が最小になるようにする。
        # 上だけをみる
        if s[h-1][w] and not s[h][w]:
          temp_up = dp[h-1][w] + 1
        else:
          temp_up = dp[h-1][w]
        
        # 左だけを見る
        if s[h][w-1] and not s[h][w]:
          temp_left = dp[h][w-1] + 1
        else:
          temp_left = dp[h][w-1]

        dp[h][w] = min(temp_up, temp_left)

  print(dp[H-1][W-1])

if __name__ == "__main__":
  resolve()

### FIXED CODE ###

def resolve():
  H, W = map(int, input().split(" "))
  s = []
  dp = [[0] * W for i in range(H)]
  for _ in range(H):
    s.append([x == "." for x in list(input())])

  for h in range(H):
    for w in range(W):
      if h == 0 and w == 0:
        if not s[0][0]:
          dp[0][0] = 1

      elif h == 0:
        dp[0][w] = dp[0][w-1]
        if s[0][w-1] and not s[0][w]:
          dp[0][w] += 1

      elif w == 0:
        dp[h][0] = dp[h-1][0]
        if s[h-1][0] and not s[h][0]:
          dp[h][0] += 1

      else:
        # 左側と上側を見て、操作回数が最小になるようにする。
        # 上だけをみる
        temp_up = dp[h-1][w]
        if s[h-1][w] and not s[h][w]:
          temp_up += 1

        # 左だけを見る
        temp_left = dp[h][w-1]
        if s[h][w-1] and not s[h][w]:
          temp_left += 1

        dp[h][w] = min(temp_up, temp_left)

  print(dp[H-1][W-1])

if __name__ == "__main__":
  resolve()
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define reps(i, m, n) for (int i = m; i < n; i++)
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

map<ll, double> memo;

double dp(int a, int b, int c, int n){
    if ((a == 0) && (b == 0) && (c == 0)) return 0.0;
    if ((a < 0) || (b < 0) || (c < 0)) return 0.0;
    if ((a > n) || (b > n) || (c > n)) return 0.0;
    ll judge = a*1000000+b*1000+c;
    if (memo[judge] != 0) return memo[judge];
    double res = n;
    res += a*dp(a-1, b, c, n);
    res += b*dp(a+1, b-1, c, n);
    res += c*dp(a, b+1, c-1, n);
    res /= a+b+c;
    memo[judge] = res;
    return res;
}

int main(void){
    int n;
    scanf("%d", &n);
    int a = 0;
    int b = 0;
    int c = 0;
    int sub;
    rep(i, n){
        scanf("%d", &sub);
        if (sub == 1) a++;
        if (sub == 2) b++;
        if (sub == 3) c++;
    }
    
    double ans;
    ans = dp(a, b, c, n);
    
    printf("%.11lf", ans);
    
    return 0;
}




### FIXED CODE ###

import sys
from collections import Counter
input = sys.stdin.readline


N = int(input())
memo = [[[-1]*(N+1) for _ in range(N+1)] for _ in range(N+1)]

def dp(a, b, c):
    if a == b == c == 0: return 0
    if memo[a][b][c] != -1:
        return memo[a][b][c]
    
    res = N
    if a > 0: res += a*dp(a-1, b, c)
    if b > 0: res += b*dp(a+1, b-1, c)
    if c > 0: res += c*dp(a, b+1, c-1)
    res /= a+b+c
    
    memo[a][b][c] = res
    return res

def main():
    A = list(map(int, input().split()))
    
    count = Counter(A)
    for i in range(1, 4):
        if not i in count: count[i] = 0
    x, y, z = count[1], count[2], count[3]

    
    ans = dp(x, y, z)
    
    print(ans)
        

    
if __name__ == "__main__":
    main()
a, b, c = map(int,input().split())
if (a == b) and (b == c):
  print ("Yes")
 else:
  print ("No")

### FIXED CODE ###

a, b, c = map(int,input().split())
if (a == b) and (b == c):
  print ("Yes")
else:
  print ("No")
N = int(input())

k=0

for s in range(1,N):
  k = (N-1) // s
  t += k 
  
print (t)


### FIXED CODE ###

N = int(input())

k=0

for s in range(1,N):
  k += (N-1) // s
   
  
print (k)
A, op, B = input(),split()
if op is '+':
  print(int(A)+int(B))
if op is '-':
  print(int(A)-int(B))

### FIXED CODE ###

A, op, B = input().split()
if op is '+':
  print(int(A)+int(B))
if op is '-':
  print(int(A)-int(B))
n, a = map(int, input().split())
x = [0] + list(map(int, input().split()))
nx = n*max(x)

# DP: x1からxjまでの間でk枚を選んで合計がsになる組み合わせの数
dp = [ [ [0 for s in range(nx+1)] for k in range(n+1)] for j in range(n+1)]
dp[0][0][0] = 1

for j in range(1, n+1):
    for k in range(n+1):
        for s in range(nx+1):
            if x[j] > s:
                dp[j][k][s] = dp[j-1][k][s]
            elif k >= 1:
                dp[j][k][s] = dp[j-1][k][s] + dp[j-1][k-1][s-x[j]]
#print(dp)
ans = 0
for k in range(1, n+1):
    ans += dp[-1][k][a * k]

print(ans)


### FIXED CODE ###

n, a = map(int, input().split())
x = [0] + list(map(int, input().split()))
nx = 2501

# DP: x1からxjまでの間でk枚を選んで合計がsになる組み合わせの数
dp = [ [ [0 for s in range(nx+1)] for k in range(n+1)] for j in range(n+1)]
dp[0][0][0] = 1

for j in range(1, n+1):
    for k in range(n+1):
        for s in range(nx+1):
            if x[j] > s:
                dp[j][k][s] = dp[j-1][k][s]
            elif k >= 1:
                dp[j][k][s] = dp[j-1][k][s] + dp[j-1][k-1][s-x[j]]
#print(dp)
ans = 0
for k in range(1, n+1):
    ans += dp[-1][k][a * k]

print(ans)
def cal(X,Y,H):

    for i in range(0,101): #C_x
        for j in range(0,101): #C_y
            temp=H[0]+abs(X[0]-i)+abs(Y[0]-j)
            for l in range(1,N):
                if(H[l]!=0):
                    s=H[l]+abs(X[l]-i)+abs(Y[l]-j)
                    if(temp==s):
                        temp=s
                    else:
                        break
                else:
                    if(temp-abs(X[l]-i)-abs(Y[l]-j)>0):
                        break
            else:    
                return print("{} {} {}".format(i,j,temp))

N=int(input())
X=[]
Y=[]
H=[]
for i in range(N):
    x,y,h=list(map(int,input().split()))
    X.append(x)
    Y.append(y)
    H.append(h)
cal(X,Y,H)

### FIXED CODE ###

i=int(input())

if(i==1):
    print("Hello World")
else:
    A=int(input())
    B=int(input())
    print(A+B)
n,m = map(int,input().split())
x = list(map(int, input().split()))
x_new = sorted(x)
intervals = [0]*(m-1)
for i in range(m-1):
  intervals[i] = abs(x_new[i+1] - x_new[i])
c = sorted(intervals, reverse=True)
s = 0
for j in range(n-1):
  s += c[j]
 
min = sum(intervals) - s
print(min)

### FIXED CODE ###

n,m = map(int,input().split())
x = list(map(int, input().split()))
x_new = sorted(x)
intervals = [0]*(m-1)
for i in range(m-1):
  intervals[i] = abs(x_new[i+1] - x_new[i])
c = sorted(intervals, reverse=True)
s = 0
if n < m:
    for j in range(n-1):
        s += c[j]
    min = sum(intervals) - s
    print(min)
else:
    print(0)
a=[int(input())for i in[0]*int(input())]
b=max(a)
if a.count(b)>1:print('\n'.join([b for i in a]))
else:
  c=[b for i in a]
  c[a.index(b)]=max(a[:a.index(b)]+a[a.index(b)+1:])

### FIXED CODE ###

print(3*int(input())**2)
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
s = []

for i in h:
    s.append(abs(t-a-i*0.006))

print(s.index(min(s))+1)

### FIXED CODE ###

X,Y = map(int,input().split())
print(X+Y//2)
K,S=map(int,input().split())
ans = 0
z = 0
for x in range(K):
    for y in range(K):
        z = S - x - y
        if z >= 0 and Z <= K:
            ans += 1
print(ans)

### FIXED CODE ###

K,S=map(int,input().split())
ans = 0
z = 0
for x in range(K+1):
    for y in range(K+1):
        z = S - x - y
        if z >= 0 and z <= K:
            ans += 1
print(ans)
A,B = map(int,input().split())

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

comdiv = [] 
div = make_divisors(A)
for i in div:
  if B % i == 0:
    comdiv.append(i)

def Eratosthenes(n):

    dp = [False]*n#sその値が素数かどうかを格納する。Falseなら素数。#場合によってはこちらをreturnしても良い。
    dp[0] = dp[1] = True#0,1はそれぞれ素数ではないのでTrueを入れる
    prime = []#素数列
    for i in range(2,n):
        if dp[i]:
            continue#素数でなければcontinue
        prime.append(i)#素数であれば足す
        #以下、iより大きいiの倍数を除外する処理
        for j in range(i*2,n,i):
          dp[j] = True
    return prime
  
flg = [False] * (max(A,B) + 1)
  
Era = Eratosthenes(max(A,B))
for e in Era:
  flg[e] = True

cnt = 0
for i in comdiv:
  if flg[i] == True:
    cnt += 1
print(cnt+1)

### FIXED CODE ###

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

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

comdiv = [] 
div = make_divisors(A)
for i in div:
  if B % i == 0:
    comdiv.append(i)
#print(comdiv)

def isPrime(n):
  if n < 2:
    return False
  i = 2
  while i*i <= n:
    if n%i == 0:
      return False
    i += 1
  return True

cnt = 0
for i in comdiv:
  if isPrime(i):
    cnt += 1
print(cnt+1)
import math
def lcm(x, y):
    return x // math.gcd(x, y) *y
a,b = map(int,input().split())
ans = lcm(a,b)
print(ans)

### FIXED CODE ###

from fractions import gcd
def lcm(x, y):
    return (x // gcd(x, y) *y)
a,b = map(int,input().split())
ans = lcm(a, b)
print(ans)
a,w=map(int,input().split())
b,y=map(int,input().split())
n=int(input())
print("YES") if abs(a-b)/(w-y)<n else print("NO")

### FIXED CODE ###

a,w=map(int,input().split())

b,y=map(int,input().split())

n=int(input())

if w<=y:

  print("NO")

else:

  print("YES") if abs(a-b)/(w-y)<=n else print("NO")
import numpy as np

def calc(n):
    if n < 2:
        return 0
    lim = int((n - 2) ** 0.5 - 1) + 1

    result=np.zeros(n+1,dtype=int)
    for x in range(1, lim):
        for y in range(1, lim):
            if x > y:
                continue
            for z in range(1, lim):
                if y > z:
                    continue
                index = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
                if index>=n:continue
                s = set([x, y, z])
                if len(s) == 1:
                    result[index] += 1
                elif len(s) == 2:
                    result[index] += 3
                else:
                    result[index] += 6

    return result[1:]

for i in calc(int(input())):
    print(i)

### FIXED CODE ###

import numpy as np


def calc(n):
    #     lim = int((n - 2) ** 0.5 - 1) + 1
    lim = 130

    result = np.zeros(n + 1, dtype=int)
    for x in range(1, lim):
        for y in range(1, lim):
            if x > y:
                continue
            for z in range(1, lim):
                if y > z:
                    continue
                index = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
                if index > n:
                    continue
                s = set([x, y, z])
                if len(s) == 1:
                    result[index] += 1
                elif len(s) == 2:
                    result[index] += 3
                else:
                    result[index] += 6

    return result[1:]


for i in calc(int(input())):
    print(i)