Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

# import math

N = int(input())
An = [int(x) for x in input().split()]  
Cn = [An.count(i) for i in range(1,N+1)]  # どの数字が何個あるか？

# ボールを全部使えるときの合計を求める
s = 0
for i in range(N):
    if Cn[i] > 1:
        s += int(Cn[i]*(Cn[i]-1) / 2)

for k in range(N):
    print(s - (Cn[An[k]-1]-1))

### FIXED CODE ###

import collections as c

# 入力
N = int(input())
An = [int(x) for x in input().split()]
 
# 各数字の個数を求める
Cn = c.Counter(An)
 
# 全部の組み合わせ
s = 0
for v in Cn.values():
    s += int(v*(v-1) / 2)

for i in range(0,N):
    print(s - (Cn[An[i]] - 1))
### BUGGY CODE ###

def main():
    N, M, Q = map(int, input().split())
    LR = []
    for _ in range(M):
        L, R = map(int, input().split())
        LR.append((L, R))
    ans = []
    for _ in range(Q):
        p, q = map(int, input().split())
        c = 0
        for L, R in LR:
            if p > L or R > q:
                continue
            c += 1
        ans.append(c)
    for a in ans:
        print(a)


main()


### FIXED CODE ###

def main():
    N, M, Q = map(int, input().split())
    cs = [[0 for _ in range(N + 1)] for _ in range((N + 1))]
    for _ in range(M):
        L, R = map(int, input().split())
        cs[L][R] += 1
    for i in range(1, N + 1):
        for j in range(1, N + 1):
            cs[i][j] += cs[i - 1][j]
            cs[i][j] += cs[i][j - 1]
            cs[i][j] -= cs[i - 1][j - 1]
    ans = []
    for _ in range(Q):
        p, q = map(int, input().split())
        ans.append(cs[q][q] - cs[q][p - 1] - cs[p - 1][q] + cs[p - 1][p - 1])
    for a in ans:
        print(a)


main()
### BUGGY CODE ###

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

count=1
if n>1:
    for i in range(1,n):
        count2=0
        for j in range(0,i):
            if p[i]>p[j]:
                count2+=1
        if count2==0:
            count+=1
print(count)
        


### FIXED CODE ###

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

count=0
min=p[0]
for i in range(n):
    if p[i]<=min:
        count+=1
        min=p[i]
print(count)
### BUGGY CODE ###

import sys


def extgcd(a, b):
    r = [1, 0, a]
    w = [0, 1, b]
    while w[2] != 1:
        q = r[2] // w[2]
        r2 = w
        w2 = [r[0] - q * w[0], r[1] - q * w[1], r[2] - q * w[2]]
        r = r2
        w = w2
    return [w[0], w[1]]


def mod_inv(a, m):
    x = extgcd(a, m)[0]
    return (m + x % m) % m


def main():
    X, Y = map(int, input().split())
    C = 10**9 + 7

    if (X + Y) % 3 != 0:
        print(0)
        sys.exit()
    cnt = [0, 0]
    if Y / X >= 1:
        (i, j) = (1, 2)
        cnt[0] += 1
    else:
        (i, j) = (2, 1)
        cnt[1] += 1

    while (i, j) != (X, Y):
        if Y / X > j / i:
            i += 1
            j += 2
            cnt[0] += 1
        else:
            i += 2
            j += 1
            cnt[1] += 1

    ans = 1
    for i in range(1, sum(cnt) + 1):
        ans *= i
        ans %= C
    for i in range(1, cnt[0] + 1):
        ans *= mod_inv(i, C)
        ans %= C
    for i in range(1, cnt[1] + 1):
        ans *= mod_inv(i, C)
        ans %= C

    print(ans)


main()


### FIXED CODE ###

import sys


def extgcd(a, b):
    r = [1, 0, a]
    w = [0, 1, b]
    while w[2] != 1:
        q = r[2] // w[2]
        r2 = w
        w2 = [r[0] - q * w[0], r[1] - q * w[1], r[2] - q * w[2]]
        r = r2
        w = w2
    return [w[0], w[1]]


def mod_inv(a, m):
    x = extgcd(a, m)[0]
    return (m + x % m) % m


def main():
    X, Y = map(int, input().split())
    C = 10**9 + 7

    if (X + Y) % 3 != 0:
        print(0)
        sys.exit()

    cnt = [0, 0]
    cnt[0] = (2 * X - Y) // 3
    cnt[1] = (-X + 2 * Y) // 3

    if cnt[0] < 0 or cnt[1] < 0:
        print(0)
        sys.exit()

    ans = 1
    for i in range(1, sum(cnt) + 1):
        ans *= i
        ans %= C
    for i in range(1, cnt[0] + 1):
        ans *= mod_inv(i, C)
        ans %= C
    for i in range(1, cnt[1] + 1):
        ans *= mod_inv(i, C)
        ans %= C

    print(ans)


main()
### BUGGY CODE ###

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

MOD = 10**9+7

fac = [1, 1]     # 元テーブル
f_inv = [1, 1]   # 逆元テーブル
inv = [0, 1]     # 逆元テーブル計算用テーブル

def prepare(n, mod):
    for i in range(2, n+1):
        fac.append((fac[-1] * i) % mod)
        inv.append((-inv[mod % i] * (mod//i)) % mod)
        f_inv.append((f_inv[-1] * inv[-1]) % mod)

def modcmb(n, r, mod):
    if n < 0 or r < 0:
        return 0
    if r > n:
        return 0

    return fac[n] * f_inv[r] * f_inv[n-r] % mod


def main():
    K = int(readline())
    S = readline().strip()
    N = len(S)

    prepare(N + K + 10, MOD)

    ans = 0
    for i in range(K+1):
        ans += modcmb(N-1+i, i, MOD) * pow(25, i, MOD) * pow(26, K-i, MOD) % MOD
        ans %= MOD

    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

MOD = 10**9+7

fac = [1, 1]     # 元テーブル
f_inv = [1, 1]   # 逆元テーブル
inv = [0, 1]     # 逆元テーブル計算用テーブル

def prepare(n, mod):
    for i in range(2, n+1):
        fac.append((fac[-1] * i) % mod)
        inv.append((-inv[mod % i] * (mod//i)) % mod)
        f_inv.append((f_inv[-1] * inv[-1]) % mod)

def modcmb(n, r, mod):
    if n < 0 or r < 0:
        return 0
    if r > n:
        return 0

    return fac[n] * f_inv[r] * f_inv[n-r] % mod


def main():
    K = int(readline())
    S = readline().strip()
    N = len(S)

    prepare(N + K + 10, MOD)

    ans = 0
    for i in range(K+1):
        ans += modcmb(N-1+i, i, MOD) * pow(25, i, MOD) * pow(26, K-i, MOD) % MOD
        ans %= MOD

    print(ans)


if __name__ == "__main__":
    main()
### BUGGY CODE ###

import numpy as np
N= int(input())
A = list(map(int,input().split()))
A=np.array(A)
for i in range(1,N+1):
    print(np.count_nonzero(A == i))

### FIXED CODE ###

ans=[0]*int(input())
N=list(map(int,input().split()))

for i in N:
    ans[i-1]+=1
print(*ans)
### BUGGY CODE ###

# AGC023
import numpy as np
N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
ans = 0
for i in range(N):
    tmp = A[i:N]
    rest = np.cumsum(tmp)
    ans += np.count_nonzero(rest == 0)
print(ans)

### FIXED CODE ###

# AGC023
import collections
N = int(input())
A = list(map(int, input().split()))
ans = 0
S = [0] * (N+1)
for i in range(N):
    S[i+1] = S[i] + A[i]
c = collections.Counter(S)
c = c.most_common()
for i in range(len(c)):
    tmp = c[i][1]
    if tmp == 1:
        pass
    else:
        ans += tmp*(tmp-1) // 2
print(int(ans))
### BUGGY CODE ###

n, k = map(int, input().split())
l = []
for i in range(n):
    a, b = map(int, input().split())
    l += [a] * b
l.sort()
print(l[k-1])


### FIXED CODE ###

n, k = map(int, input().split())
l = [0] * (10**5 + 1)
for i in range(n):
    a, b = map(int, input().split())
    l[a] += b
s = 0
for i, v in enumerate(l):
    s += v
    if s >= k:
        print(i)
        break
### BUGGY CODE ###

n,k=map(int,input().split())
dp=[0 for i in range(n+1)]
dp[1]=1
accum=[0 for i in range(n+1)]
accum[1]=1
s=[]
for i in range(k):
    x,y=map(int,input().split())
    s.append([x,y])
for i in range(2,n+1):
    for j in s:
        l,r=j
        tmpl=i-r
        tmpr=i-l
        if(tmpl<1):
            tmpl=1
        if(tmpr>=i):
            tmpr=i-1
        dp[i]+=accum[tmpr]-accum[tmpl-1]
    accum[i]=dp[i]+accum[i-1]
print(dp[n]%998244353)

### FIXED CODE ###

n,k=map(int,input().split())
dp=[0 for i in range(n+1)]
dp[1]=1
accum=[0 for i in range(n+1)]
accum[1]=1
s=[]
for i in range(k):
    x,y=map(int,input().split())
    s.append([x,y])
for i in range(2,n+1):
    for j in s:
        l,r=j
        tmpl=i-r
        tmpr=i-l
        if(tmpl<1):
            tmpl=1
        if(tmpr>=i):
            tmpr=i-1
        if(tmpr<0):
            continue
        dp[i]+=accum[tmpr]-accum[tmpl-1]
        dp[i]%=998244353
    accum[i]=dp[i]+accum[i-1]
    accum[i]%=998244353
print(dp[n]%998244353)
### BUGGY CODE ###

from itertools import permutations
N, M, R = map(int, input().split())
rs = permutations(map(lambda x: int(x) - 1, input().split()))
dist = [[10**9 for _ in range(N)] for _ in range(N)]
for _ in range(M):
    v1, v2, d = map(int, input().split())
    dist[v1-1][v2-1] = dist[v2-1][v1-1] = d
for i in range(N):
    dist[i][i] = 0
for k in range(N):
    for i in range(N):
        for j in range(N):
            dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])
ans = 10**9
for r in rs:
    t = 0
    for i in range(R-1):
        t += dist[r[i]][r[i+1]]
        if t > 10**9:
            break
    ans = min(t, ans)
print(ans)


### FIXED CODE ###

from itertools import permutations
N, M, R = map(int, input().split())
rs = map(lambda x: int(x) - 1, input().split())
dist = [[10**9 for _ in range(N)] for _ in range(N)]
for _ in range(M):
    v1, v2, d = map(int, input().split())
    dist[v1-1][v2-1] = dist[v2-1][v1-1] = d
for i in range(N):
    dist[i][i] = 0
for k in range(N):
    for i in range(N):
        for j in range(N):
            dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])
ans = 10**9
for r in permutations(rs):
    t = 0
    for i in range(R-1):
        t += dist[r[i]][r[i+1]]
        if t > 10**9:
            break
    ans = min(t, ans)
print(ans)
### BUGGY CODE ###

n    = int(input())
a_s  = list(map(int, input().split()))
q    = int(input())
bc_s = [ list(map(int, input().split())) for _ in range(q) ]

s = sum(a_s)
m = {}

for b, c in bc_s:
    nb = a_s.count(b) + m.get(b, 0)
    s += nb * (c - b)
    print(s)
    m[c] = nb + m.get(c, 0)


### FIXED CODE ###

n    = int(input())
a_s  = list(map(int, input().split()))
q    = int(input())
bc_s = [ list(map(int, input().split())) for _ in range(q) ]

s = sum(a_s)
m = { a: 0 for a in a_s }

for a in a_s:
    m[a] += 1

for b, c in bc_s:
    nb = m.get(b, 0)
    s += nb * (c - b)
    print(s)
    m[b] = 0
    m[c] = nb + m.get(c, 0)
### BUGGY CODE ###

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
count=0
for i in range(n):
	for j in range(n):
		if a[i]<b[j]:
			for k in range(n):
				if b[j]<c[k]:
					count+=1
print(count)			

### FIXED CODE ###

import bisect
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 i in B:
  a=bisect.bisect_left(A,i)
  b=N-bisect.bisect_right(C,i)
  ans+=a*b
print(ans)
### BUGGY CODE ###

s = input()
q = int(input())
S = ''
head = True

for i in range(q):
    li = input().split()
    if li[0] == '1':
        head = not head
    else:
        if head:
            if li[1] == '1':
                s = li.pop() + s
            else:
                s = s + li.pop()
        else:
            if li[1] == '2':
                s = li.pop() + s
            else:
                s = s + li.pop()

if not head:
    s = s[::-1]
print(s)

### FIXED CODE ###

from collections import deque

s = input()
q = int(input())
S = deque(s)
head = True

for i in range(q):
    li = input().split()
    if li[0] == '1':
        head = not head
    else:
        if head:
            if li[1] == '1':
                S.appendleft(li.pop())
            else:
                S.append(li.pop())
        else:
            if li[1] == '2':
                S.appendleft(li.pop())
            else:
                S.append(li.pop())
s = ''.join(S)
if not head:
    s = s[::-1]
print(s)
### BUGGY CODE ###

import numpy as np

n, k = map(int, input().split())
arr = np.concatenate(
    [np.array(list(map(int, input().split()))), np.zeros(k, dtype=int)])

INF = 1 << 20

# dp初期化
dp = np.full([k, n + k], INF, dtype=int)
for i in range(k):
    dp[i, i + 1] = np.abs(arr[i + 1] - arr[0])

for i in range(1, n):
    for j in range(1, k + 1):
        dp[j - 1, i + j] = dp[:, i].min() + np.abs(arr[i + j] - arr[i])

print(dp[:, n - 1].min())

### FIXED CODE ###

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

# dp初期化
dp = [float("inf")] * n
dp[0] = 0

for i in range(1, n):
    dp[i] = min(dp[j] + abs(arr[i] - arr[j]) for j in range(max(i - k, 0), i))

print(dp[n - 1])
### BUGGY CODE ###

# -*- coding: utf-8 -*-
from sys import stdin

s_in = lambda: stdin.readline()[:-1] # s = s_in()
d_in = lambda: int(stdin.readline()) # N = d_in()
ds_in = lambda: list(map(int, stdin.readline().split())) # List = ds_in()

N, M = ds_in()
S = s_in()
T = s_in()

# 最大公約数
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a


# 最小公倍数
def lcm(a, b):
	return a * b // gcd (a, b)

lcm_NM = lcm(N, M)
for i in range(N * M // lcm_NM):
    if S[i*lcm_NM//M] != T[i*lcm_NM//N]:
        print(-1)
        exit()

ans = ''
for i in range(lcm_NM):
    if i % lcm_NM == 0:
        ans += S[i // M]
    elif i % M == 0:
        ans += S[i // M]
    elif i % N == 0:
        ans += T[i // N]
    else:
        ans += 'a'
print(len(ans))



### FIXED CODE ###

# -*- coding: utf-8 -*-
from sys import stdin

s_in = lambda: stdin.readline()[:-1] # s = s_in()
d_in = lambda: int(stdin.readline()) # N = d_in()
ds_in = lambda: list(map(int, stdin.readline().split())) # List = ds_in()

N, M = ds_in()
S = s_in()
T = s_in()

# 最大公約数
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a


# 最小公倍数
def lcm(a, b):
	return a * b // gcd (a, b)

lcm_NM = lcm(N, M)
for i in range(N * M // lcm_NM):
    if S[i*lcm_NM//M] != T[i*lcm_NM//N]:
        print(-1)
        exit()

print(lcm_NM)
### BUGGY CODE ###

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

A=a.count(1)
B=a.count(2)
C=a.count(3)

dp=[[[0]*(n+1) for _ in range(n+1)] for _ in range(n+1)]

for k in range(C+1):
    for j in range(B+C+1-k):
        for i in range(n+1-k-j):
            if i==0 and j==0 and k==0:
                continue
            res=n
            if i > 0:
                res+=i*dp[i -1][j][k]
            if j > 0:
                res+=j*dp[i + 1][j - 1][k]
            if k > 0:
                res+=k*dp[i][j + 1][k -1]
            dp[i][j][k]=res/(i+j+k)
print(dp[A][B][C])


### FIXED CODE ###

import sys
input = sys.stdin.readline
n=int(input())
a=list(map(int,input().split()))

A=a.count(1)
B=a.count(2)
C=a.count(3)

dp=[[[0.0]*(n+1) for _ in range(n+1)] for _ in range(n+1)]
def c():
    for k in range(C+1):
        for j in range(B+C+1-k):
            for i in range(n+1-k-j):
                if i==0 and j==0 and k==0:
                    continue
                res=1.0*n
                if i>0:
                    res+=i*dp[i-1][j][k]
                if j>0:
                    res+=j*dp[i+1][j-1][k]
                if k>0:
                    res+=k*dp[i][j+1][k-1]
                dp[i][j][k]=res/(i+j+k)
    print(dp[A][B][C])
c()
### BUGGY CODE ###

N = input()

def search(i):
        anti = [0,1,2,4,6,8,9]
        for j in anti:
                tmp = str(i).count(str(j))
                if tmp != 0:
                        return False

        cnt3 = str(i).count('3')
        if cnt3 == 0:
                return False
        cnt5 = str(i).count('5')
        if cnt5 == 0:
                return False
        cnt7 = str(i).count('7')
        if cnt7 == 0:
                return False

        return True

ans = 0
if int(N) < 357:
        print(ans)
        exit()

for i in range(357, int(N)+1):
        if search(i):
                ans += 1

print(ans)


### FIXED CODE ###

N = input()

def search(i):
        if int(i) > int(N):
                return 0

        nums = [3, 5, 7]
        count = 0
        if all(i.count(str(n)) > 0 for n in nums):
                count = 1
        else:
                count = 0
        
        for n in nums:
                count += search(i + str(n))
        
        return count

print(search(str(0)))
### BUGGY CODE ###

H,W,D=map(int,input().split())
A=[[0,0] for i in range(H*W+1)]
for i in range(H):
    a=list(map(int,input().split()))
    for j in range(W):
        A[a[j]]=[i+1,j+1]
#print(A)

Q=int(input())
for x in range(Q):
    L,R=map(int,input().split())
    P=A[L]
    if L==R:
        print(0)
    else:
        ans=0
        for y in range(H*W):
            if L+(y+1)*D==R:
                ans+=(abs(A[L+y*D][0]-A[L+(y+1)*D][0])+abs(A[L+y*D][1]-A[L+(y+1)*D][1]))
                print(ans)
                break
            else:
                ans+=(abs(A[L+y*D][0]-A[L+(y+1)*D][0])+abs(A[L+y*D][1]-A[L+(y+1)*D][1]))

### FIXED CODE ###

H,W,D=map(int,input().split())
L=[0 for i in range(H*W+1)]
A=[]
for i in range(H):
    a=list(map(int,input().split()))
    A.append(a)
    
for i in range(H):
    for j in range(W):
        L[A[i][j]]=[i+1,j+1]
L[0]=[0,0]
#print(L)
l=[0 for i in range(H*W+1)]
for i in range(D):
    for j in range(H*W+1):
        if (i+j*D)>(H*W):
            break
        elif j==0:
            l[i+j*D]=0
        else:
            l[i+j*D]=l[i+(j-1)*D]+abs(L[i+j*D][0]-L[i+(j-1)*D][0])+abs(L[i+j*D][1]-L[i+(j-1)*D][1])
#print(l)
Q=int(input())
for i in range(Q):
    a,b=map(int,input().split())
    print(l[b]-l[a])
### BUGGY CODE ###

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

result = 0
for i in range(N):
    for j in range(i+1, N):
        result += (A[i] * A[j]) % (10**9 + 7)
print(result % (10**9 + 7))


### FIXED CODE ###

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

A_sum = sum(A)
result = 0
for i in range(N):
    A_sum -= A[i]
    result += A[i] * A_sum % (10**9 + 7)
print(result % (10**9 + 7))
### BUGGY CODE ###

def factorize(x):
    p = 2
    f = {}
    while x*x>=p:
        if x%p==0: f[p]=0
        while x%p==0:
            f[p]+=1
            x//=p
        p+=1
    if x>1: f[x]=1
    return f

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

F = {0:0}

for a in A:
    for f in set(factorize(a)):
        if f not in F: F[f] = 0
        F[f] += 1

m = max(F.values())
if m<=1:
    print('pairwise coprime')
elif m<N:
    print('setwise coprime')
else:
    print('not coprime')


### FIXED CODE ###

def factorize(x):
    f = set()
    if x%2==0: f.add(2)
    while x%2==0: x//=2
    
    p = 3
    while x>=p*p:
        if x%p==0: f.add(p)
        while x%p==0: x//=p
        p+=2
    if x>1: f.add(x)
    return f

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

F = [0]*(10**6+5)

for a in A:
    for f in factorize(a):
        F[f] += 1

m = max(F)
if m<=1:
    print('pairwise coprime')
elif m<N:
    print('setwise coprime')
else:
    print('not coprime')
### BUGGY CODE ###

import math

def is_prime_sqrt(q): #合成数xはp<=sqrt(x)を満たす素因子pを持つ
    if q == 1: #1は素数ではない
        return False
    if q == 2: #2は素数
        return True
    elif q % 2 == 0: #2以外の偶数は合成数
        return False
    for divisor in range(3, math.floor(math.sqrt(q))+1, 2): #繰り返しの上限は平方根
        if q % divisor == 0: #平方根までに約数があれば合成数
            return False
    return True

def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n): #nまでの素数をエラトステネスの篩で列挙
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i > 1]

Q = int(input())
A = [0] * 100001 #A[0]からA[100000]までのリスト
A[3] = 1
S = sieve(100000)

for i in range(5,100001,4):
    if i in S and (i+1)/2 in S:
        A[i] = 1
for i in range(4,100001):
    A[i] += A[i-1]

for i in range(Q):
    l, r = map(int, input().split())
    print(A[r]-A[l-1])


### FIXED CODE ###

import math

def is_prime_sqrt(q): #合成数xはp<=sqrt(x)を満たす素因子pを持つ
    if q == 1: #1は素数ではない
        return False
    if q == 2: #2は素数
        return True
    elif q % 2 == 0: #2以外の偶数は合成数
        return False
    for divisor in range(3, math.floor(math.sqrt(q))+1, 2): #繰り返しの上限は平方根
        if q % divisor == 0: #平方根までに約数があれば合成数
            return False
    return True

def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n): #nまでの素数をエラトステネスの篩で列挙＝戻り値は各要素が素数のリスト
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i > 1]

def sieveyn(n): #nまでの素数をエラトステネスの篩で列挙＝戻り値は各要素が素数のリスト
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return s


Q = int(input())
A = [0] * 100001 #A[0]からA[100000]までのリスト
A[3] = 1
S = sieveyn(100000)

for i in range(5,100001,4):
    if S[i] and S[int((i+1)/2)]:
        A[i] = 1
for i in range(4,100001):
    A[i] += A[i-1]

#print(A[:100])

for i in range(Q):
    l, r = map(int, input().split())
    print(A[r]-A[l-1])
### BUGGY CODE ###

N = list(input()) #e.g. 1432
buf_1 = 0 #入力の3桁目以上 - 2桁目以下 ,1400
buf_2 = 0 #X_1+...+X_6はこれ以下 , 入力の3桁目以上,14

if len(N) <= 2 : #2桁以下なら終了
    print(0)
    exit()

#3桁以上なら続行
M = 10*int(N[-2]) + int(N[-1]) #入力の2桁目以下,32
for i in range(len(N) - 2) :
    buf_1 += (100*(10**i)) * int(N[-(i+3)]) 
buf_2 = int(buf_1/100) #入力の3桁目以上

Flag_1 = False

for j in range(int(M)+1) :
    for k in range(int(M/2)+1) :
        for l in range(int(M/3)+1) :
            for m in range(int(M/4)+1) :
                for n in range(int(M/5)+1) :
                    if M == (1*j+2*k+3*l+4*m+5*n) and (buf_2 -(j+k+l+m+n)) >= 0 :
                        #print('set is')
                        #print(buf_2 -(j+k+l+m+n),j,k,l,m,n)
                        print(1)
                        Flag_1 = True
                        exit()
if Flag_1 == False :
    print(0)

### FIXED CODE ###

X = int(input())
for i in range(1,X+1) :
    for j in range(100*i,105*i+1) :
        if X % j == 0 :
            print(1)
            exit()
print(0)
### BUGGY CODE ###

N = int(input())
ans = 0
for i in range(N):
    ans += i
print(ans)

### FIXED CODE ###

N = int(input())
ans = N*(N-1)//2
print(ans)