You are given an array $a$ consisting of $n$ integers.

Your task is to say the number of such positive integers $x$ such that $x$ divides each number from the array. In other words, you have to find the number of common divisors of all elements in the array.

For example, if the array $a$ will be $[2, 4, 6, 2, 10]$, then $1$ and $2$ divide each number from the array (so the answer for this test is $2$).


-----Input-----

The first line of the input contains one integer $n$ ($1 \le n \le 4 \cdot 10^5$) — the number of elements in $a$.

The second line of the input contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^{12}$), where $a_i$ is the $i$-th element of $a$.


-----Output-----

Print one integer — the number of such positive integers $x$ such that $x$ divides each number from the given array (in other words, the answer is the number of common divisors of all elements in the array).


-----Examples-----
Input
5
1 2 3 4 5

Output
1

Input
6
6 90 12 18 30 18

Output
4

Source: codeforces | Difficulty: EASY
Tags: Mathematics

Implementation


Solutions:
import math
from collections import deque, defaultdict
from sys import stdin, stdout
input = stdin.readline
listin = lambda : list(map(int, input().split()))
mapin = lambda : map(int, input().split())
n = int(input())
a = listin()
z = a[0]
for i in range(1, n):
	z = math.gcd(z, a[i])
d = defaultdict(int)
while z % 2 == 0:
	z //= 2
	d[2] += 1
for i in range(3, int(z ** 0.5) + 1, 2):
	while z % i == 0:
		z //= i
		d[i] += 1
if z > 1:
	d[z] += 1
ans = 1
for i in d.values():
	ans *= i + 1
print(ans)


import math
n = int(input())
a = list(map(int, input().split()))
g = 0
for i in range(n):
	g = math.gcd(g, a[i])
i = 1
count = 0
while i * i <= g:
	if i * i == g:
		count += 1
	elif g % i == 0:
		count += 2
	i += 1
print(count)


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def getlist():
	return list(map(int, input().split()))

def getvalue():
	return int(input())

def getstring():
	return input()
from functools import reduce

def factors(n):
	return 2 * sum((1 if not n % i else 0 for i in range(1, int(n ** 0.5) + 1))) - (1 if int(math.sqrt(n)) ** 2 == n else 0)
n = getvalue()
arr = getlist()
gc = arr[0]
for i in range(1, n):
	gc = math.gcd(gc, arr[i])
print(factors(gc) if gc > 1 else 1)


from math import sqrt, gcd

def Gcd(a, b):
	if b == 0:
		return a
	else:
		return Gcd(b, a % b)
n = int(input())
arr = list(map(int, input().split()))
g = arr[0]
for i in range(1, n):
	g = Gcd(g, arr[i])
ans = 0
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		if g // i == i:
			ans += 1
		else:
			ans += 2
print(ans)


import functools, math

def main():
	input()
	a = functools.reduce(math.gcd, map(int, input().split()), 0)
	ans = 0
	p = 1
	while p ** 2 <= a:
		if not a % p:
			ans += 1 + (p ** 2 < a)
		p += 1
	print(ans)
main()


import math
n = int(input())
nums = [int(x) for x in input().split()]
gcd = nums[0]
for i in nums:
	gcd = math.gcd(gcd, i)
ans = 2
for i in range(2, int(math.sqrt(gcd)) + 1, 1):
	if gcd % i == 0:
		ans += 2
if math.sqrt(gcd) // 1 * math.sqrt(gcd) // 1 == gcd:
	ans -= 1
print(ans)


import math

def hcf(a, b):
	if b == 0:
		return a
	else:
		return hcf(b, a % b)
t = int(input())
a = [int(x) for x in input().split()]
x = []
m = 0
for i in a:
	m = hcf(i, m)
z = m
if m == 1:
	print(1)
elif m == 2:
	print(2)
elif len(x) == 0:
	i = 1
	c = 0
	while i * i < z:
		if z % i == 0:
			c += 2
		i += 1
	if i * i == z:
		c += 1
	print(c)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def mex(li):
	check = [0] * 1001
	for i in li:
		check[i] += 1
	for i in range(len(check)):
		if check[i] == 0:
			return i
from math import *
for _ in range(1):
	n = int(input())
	li = list(map(int, input().split()))
	t = li[0]
	for i in li:
		t = gcd(t, i)
	(i, cnt) = (1, 0)
	while i * i <= t:
		if t % i == 0:
			if i * i == t:
				cnt += 1
			else:
				cnt += 2
		i += 1
	print(cnt)


import math

def countDivisors(n):
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt
x = int(input())
l = list(map(int, input().split()))
g = l[0]
for i in range(1, x):
	g = math.gcd(g, l[i])
print(countDivisors(g))


n = int(input())
a = list(map(int, input().split()))
b = {}
for i in a:
	b[i] = True
old = None
for i in b:
	if old == None:
		old = i
		continue
	l = old
	m = i
	if l < m:
		(l, m) = (m, l)
	while m != 0:
		l = l % m
		(l, m) = (m, l)
	old = l
r = old ** 0.5
k = 1
d = {}
while k <= r:
	if old % k == 0:
		d[k] = True
		d[old // k] = True
	k += 1
print(len(d))


from math import *
n = int(input())
a = [int(x) for x in input().split()]
g = max(a)
for i in range(n):
	g = gcd(g, a[i])
div = []
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		if g // i == i:
			div.append(i)
		else:
			div.append(i)
			div.append(g // i)
print(len(div))


from sys import stdin
import math
n = int(stdin.readline())
a = list((int(i) for i in stdin.readline().split()))
GCD = a[0]
for i in range(0, n - 1):
	GCD = math.gcd(GCD, a[i + 1])
count = 0
for i in range(1, int(math.sqrt(GCD)) + 1):
	if GCD % i == 0:
		if GCD / i == i:
			count += 1
		else:
			count += 2
print(count)


import math

def 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)
	divisors.sort()
	return divisors
n = int(input())
a = [int(item) for item in input().split()]
a_gcd = a[0]
for item in a[1:]:
	a_gcd = math.gcd(a_gcd, item)
div = divisors(a_gcd)
print(len(div))


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

def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)
g = a[0]
for x in a:
	g = gcd(g, x)
ans = 0
d = 1
while d * d <= g:
	if g % d == 0:
		ans += 1 if d * d == g else 2
	d += 1
print(ans)


import math
from decimal import Decimal
import heapq

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def Factor(n):
	Ans = []
	d = 2
	while d * d <= n:
		if n % d == 0:
			Ans.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		Ans.append(n)
	return Ans
n = int(input())
a = list(map(int, input().split()))
d = a[0]
for i in range(1, n):
	d = math.gcd(d, a[i])
b = Factor(d)
d = {}
for i in b:
	if i != 1:
		d[i] = d.get(i, 0) + 1
ans = 1
for i in d:
	ans *= d[i] + 1
print(ans)


import math

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
l = list(map(int, input().split()))
k = 0
if n == 1:
	gcd = l[0]
else:
	num1 = l[0]
	num2 = l[1]
	gcd = find_gcd(num1, num2)
	for i in range(2, len(l)):
		gcd = find_gcd(gcd, l[i])
for i in range(1, int(math.sqrt(gcd)) + 1):
	if gcd % i == 0:
		k += 1
		if i != gcd / i:
			k += 1
print(k)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
a = [int(x) for x in input().split()]
d = a[0]
for i in range(1, n):
	d = gcd(d, a[i])
p = 1
k = 0
while p * p < d:
	if d % p == 0:
		k += 2
	p += 1
if p * p == d:
	k += 1
print(k)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
from math import ceil
n = int(input())
a = list(map(int, input().split()))
temp_gcd = min(a)
k = 0
for i in a:
	temp_gcd = gcd(temp_gcd, i)
i = 1
while i ** 2 <= temp_gcd:
	if temp_gcd % i == 0:
		k += 1
		if i != temp_gcd // i:
			k += 1
	i += 1
print(k)


from math import *
from sys import stdin, stdout, setrecursionlimit

def my_gcd(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a

def arr_inp():
	return [int(x) for x in input().split()]
(n, a) = (int(input()), arr_inp())
(div, ans) = (0, 0)
for i in a:
	div = int(my_gcd(max(i, div), min(i, div)))
c = 1
while c ** 2 < div:
	if div % c == 0:
		ans += 2
	c += 1
if c ** 2 == div:
	ans += 1
print(ans)


from math import gcd
import math

def func(n):
	i = 1
	cnt = 0
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				cnt += 1
			else:
				cnt += 2
		i += 1
	return cnt
n = int(input())
arr = list(map(int, input().split()))
cnt = arr[0]
for i in range(1, n):
	cnt = gcd(cnt, arr[i])
print(func(cnt))


from math import gcd
n = int(input())
a = list(map(int, input().split()))
x = 0
for _ in a:
	x = gcd(x, _)
ans = 0
t = 1
while t * t <= x:
	if x % t == 0:
		ans += 1
		if t * t != x:
			ans += 1
	t += 1
print(ans)


n = int(input())
l = list(map(int, input().split()))
g = l[0]
import math
for i in l:
	g = math.gcd(i, g)
ans = 0
for div in range(1, int(g ** 0.5) + 1):
	if g % div == 0:
		if div * div == g:
			ans += 1
			break
		else:
			ans += 2
print(ans)


from math import gcd
from math import sqrt

def main():
	n = int(input())
	a = list(map(int, input().split()))
	g = a[0]
	for i in range(1, n):
		g = gcd(g, a[i])
	f = int(sqrt(g))
	k = 0
	for i in range(1, f + 1):
		if g % i == 0:
			k += 1
	k *= 2
	if g / f == f:
		k -= 1
	print(k)
main()


import math
n = int(input())
c = list(map(int, input().split()))
g = 0
for i in c:
	g = math.gcd(g, i)
sq = int(math.sqrt(g))
ans = 0
for i in range(1, sq + 1):
	if g % i != 0:
		continue
	elif i * i == g:
		ans += 1
	else:
		ans += 2
print(ans)


from fractions import gcd
import math
N = int(input())
A = list(map(int, input().split()))
G = A[0]
for a in A:
	G = gcd(a, G)

def prime2(n):
	factor = {}
	tmp = int(math.sqrt(n)) + 1
	for num in range(2, tmp):
		while n % num == 0:
			n //= num
			if not num in factor.keys():
				factor[num] = 1
			else:
				factor[num] += 1
	if n != 1:
		if not n in factor.keys():
			factor[n] = 1
		else:
			factor[n] += 1
	return factor
B = prime2(G)
ans = 1
for (k, v) in B.items():
	ans *= v + 1
print(ans)


from math import sqrt

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
l = [int(x) for x in input().split()]
if n == 1:
	g = l[0]
else:
	g = gcd(l[0], l[1])
	for i in range(2, n):
		g = gcd(g, l[i])
k = int(sqrt(g))
c = 0
for i in range(1, k + 1):
	if g % i == 0:
		if g // i == i:
			c += 1
		else:
			c += 2
print(c)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
ln = [int(i) for i in input().split(' ')]
m = ln[0]
for i in range(1, len(ln)):
	m = gcd(m, ln[i])
d = 0
for i in range(1, int(m ** 0.5) + 1):
	if m % i == 0:
		d += 2
		if i == m ** 0.5:
			d -= 1
print(d)


n = int(input())
a = list(map(int, input().split(' ')))
from math import *
gc = 0
for i in a:
	gc = gcd(gc, i)
count = 0
i = 1
while i * i <= gc:
	if i * i == gc:
		count += 1
	elif gc % i == 0:
		count += 2
	i += 1
print(count)


import sys
import random
from math import log2, log, ceil
input = sys.stdin.readline

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	while x != link[x]:
		x = link[x]
	return x

def union(x, y, size, link):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().split()))
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
n = int(input())
a = int_array()
for i in range(n):
	if i == 0:
		x = a[i]
	else:
		x = gcd(x, a[i])
prime = primefs(x)
ans = 1
if len(prime) != 0:
	for i in prime.values():
		ans *= i + 1
print(ans)


from math import gcd, sqrt
from functools import reduce
input()
x = reduce(gcd, map(int, input().split()))
ans = 0
for i in range(1, int(sqrt(x)) + 1):
	if x % i == 0:
		if i * i == x:
			ans += 1
		else:
			ans += 2
print(ans)


from math import gcd

def main():
	n = int(input())
	a = [int(c) for c in input().split()]
	g = a[0]
	for i in range(1, n):
		g = gcd(g, a[i])
	final = 0
	for i in range(1, int(g ** 0.5) + 1):
		if g % i == 0:
			if g // i != i:
				final += 2
			else:
				final += 1
	print(final)
main()


from math import gcd, sqrt
n = int(input())
a = [int(i) for i in input().split()]
d = a[0]
for ai in a:
	d = gcd(d, ai)
print(2 * len([i for i in range(1, int(sqrt(d)) + 1) if d % i == 0]) - (1 if int(sqrt(d)) ** 2 == d else 0))


from sys import stdin, stdout
import math
from collections import Counter, deque
L = lambda : list(map(int, stdin.readline().strip().split()))
M = lambda : map(int, stdin.readline().strip().split())
I = lambda : int(stdin.readline().strip())
IN = lambda : stdin.readline().strip()
C = lambda : stdin.readline().strip().split()
mod = 1000000007

def s(a):
	print(' '.join(list(map(str, a))))
n = I()
a = L()
g = a[0]
ans = 0
for i in a:
	g = math.gcd(g, i)
for i in range(1, int(math.sqrt(g)) + 1):
	if g % i == 0:
		ans += 1
		if i != g // i:
			ans += 1
print(ans)


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
n = int(input())
a = list(map(int, input().split()))
g = arr = 0
for item in a:
	g = gcd(g, item)
for i in range(1, int(g ** (1 / 2)) + 1):
	if g % i == 0 and i ** 2 != g:
		arr += 2
	elif g % i == 0:
		arr += 1
print(arr)


from sys import *
from math import *
n = int(stdin.readline())
a = list(map(int, stdin.readline().split()))
a.sort()
ans = a[0]
for i in range(1, n):
	ans = gcd(ans, a[i])
b = []
for i in range(1, int(sqrt(ans)) + 2):
	if ans % i == 0:
		b.append(i)
		b.append(ans // i)
b.sort()
ans = len(b)
for i in range(1, len(b)):
	if b[i] == b[i - 1]:
		ans -= 1
print(ans)


import math
x = int(input())
a = list(map(int, input().split()))
s = 0
l = 0
if 1 in a:
	l = 1
else:
	for i in range(x):
		l = math.gcd(l, a[i])
for i in range(1, int(math.sqrt(l)) + 1):
	if l % i == 0:
		if l / i == i:
			s += 1
		else:
			s += 2
print(s)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

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

def bs(a, l, h, x):
	while l < h:
		mid = (l + h) // 2
		if a[mid] == x:
			return mid
		if a[mid] < x:
			l = mid + 1
		else:
			h = mid
	return l

def sieve(a):
	for i in range(3, 10 ** 6 + 1, 2):
		a[i] = 1
	for i in range(3, 10 ** 6 + 1, 2):
		for j in range(i * i, 10 ** 6 + 1, i):
			a[j] = 0
	a[2] = 1
	return a

def solve():
	n = int(inp())
	a = lis()
	ans = a[0]
	for i in range(1, n):
		ans = gcd(a[i], ans)
	new = []
	for i in range(1, floor(ans ** 0.5) + 1):
		if ans % i == 0:
			new.append(i)
			new.append(ans // i)
	new = list(set(new))
	print(len(new))
testcase(1)


import math
n = int(input())
x = 0
for q in map(int, input().split()):
	x = math.gcd(x, q)
ans = 0
for q in range(1, int(math.sqrt(x)) + 1):
	ans += 2 * (x % q == 0)
print(ans - (int(math.sqrt(x)) ** 2 == x))


import math
n = int(input())
a = [int(x) for x in input().split(' ')]
a.sort()
gcd = a[0]
for i in range(n - 1):
	gcd = math.gcd(gcd, a[i + 1])
	if gcd == 1:
		break
i = 1
f_set = set()
while i * i <= gcd:
	if gcd % i == 0:
		f_set.add(i)
		f_set.add(gcd // i)
	i += 1
print(len(f_set))


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
a = inara()
g = 0
for i in a:
	g = math.gcd(i, g)
ans = 0
limit = int(math.sqrt(g + 1))
for i in range(1, limit + 1):
	if g % i == 0:
		ans += 2
		if i * i == g:
			ans -= 1
print(ans)


import math
n = int(input())
list1 = input().split()
for i in range(len(list1)):
	list1[i] = int(list1[i])
gcd1 = list1[0]
for i in range(n):
	gcd1 = math.gcd(gcd1, list1[i])
val = 0
if int(math.sqrt(gcd1)) ** 2 == gcd1:
	val -= 1
for i in range(1, int(math.sqrt(gcd1)) + 1):
	if gcd1 % i == 0:
		val += 2
print(val)


import math
n = int(input())
l = list(map(int, input().split()))
x = 0
for i in range(n):
	x = math.gcd(x, l[i])
s = set()
for i in range(1, int(math.sqrt(x)) + 1):
	if x % i == 0:
		if x // i == i:
			s.add(i)
		else:
			s.add(x // i)
			s.add(i)
print(len(s))


from math import gcd, sqrt
import sys

def inpt():
	return sys.stdin.readline().strip()

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

def prost(n):
	i = 2
	ma = dict()
	qq = n
	while i <= sqrt(qq) + 1:
		if n % i == 0:
			if i not in ma:
				ma[i] = 1
			else:
				ma[i] += 1
			n = n / i
		else:
			i += 1
	su = 1
	for a in ma:
		su *= ma[a] + 1
	return su
n = int(inpt())
x = [int(i) for i in inpt().split()]
nod = x[0]
for j in range(1, n):
	nod = gcd(nod, x[j])
print(len(divisorGenerator(nod)))


import math
n = int(input())
a = list(map(int, input().split()))
d = a[0]
for i in range(1, n):
	b = max(a[i], d)
	c = min(a[i], d)
	while c:
		e = b % c
		(b, c, e) = (c, e, b)
	d = b
l = 0
c = math.floor(math.sqrt(d))
if c * c == d:
	l += 1
for i in range(1, c + 1):
	if i * i == d:
		break
	if d % i == 0:
		l += 2
print(l)


from math import gcd
n = int(input())
a = list(map(int, input().split()))
k = 0
for i in range(n):
	k = gcd(a[i], k)
ans = 0

def fact(n):
	nonlocal ans
	d = 1
	while d * d <= n:
		if n % d == 0:
			ans += 1
			if n // d != d:
				ans += 1
		d += 1
fact(k)
print(ans)


from functools import reduce
import math
n = int(input())
a = [int(i) for i in input().split()]
a.sort()
x = reduce(lambda p, q: math.gcd(p, q), a)
i = 1
ans = 0
while i <= math.sqrt(x):
	if x % i == 0:
		if i * i == x:
			ans += 1
		else:
			ans += 2
	i += 1
print(ans)


import math
n = int(input())
x = [int(i) for i in input().split()]
gcd = x[0]
for i in range(1, len(x)):
	gcd = math.gcd(gcd, x[i])
sumo = 0
for i in range(1, int(math.sqrt(gcd)) + 1):
	if gcd % i == 0:
		sumo += 1
		if i * i != gcd:
			sumo += 1
print(sumo)


import math
n = int(input())
a = [int(x) for x in input().split()]

def gcd(a, b):
	if a == 0:
		return b
	if b == 0:
		return a
	a0 = max(a, b)
	b0 = min(a, b)
	return gcd(a0 - b0 * (a0 // b0), b0)
res = 0
for x in a:
	res = gcd(x, res)
count = 0
for divisor in range(1, int(math.sqrt(res)) + 1):
	if res % divisor == 0:
		count += 2
	if divisor ** 2 == res:
		count -= 1
print(count)


from math import gcd
from functools import reduce
n = int(input())
g = reduce(gcd, map(int, input().split()))
i = 1
res = 0
while i * i <= g:
	if g % i == 0:
		res += 1
		if i * i != g:
			res += 1
	i += 1
print(res)


import math

def get_divisors(n):
	i = 1
	divisors = []
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.append(i)
				divisors.append(int(n / i))
		i = i + 1
	return divisors
input()
arr = list(map(int, input().split()))
gcd = 0
for item in arr:
	gcd = math.gcd(gcd, item)
print(len(get_divisors(gcd)))


from functools import reduce
from math import sqrt
from math import ceil
n = int(input())

def FindHCF(a, b):
	(s, t) = (max(a, b), min(a, b))
	while t != 0:
		k = s % t
		s = t
		t = k
	return s
l = list(map(int, input().split()))
HCF = reduce(FindHCF, l)
if HCF == 1:
	count = 1
else:
	count = 2
if ceil(sqrt(HCF)) == sqrt(HCF) and HCF != 1:
	count = count + 1
for i in range(2, ceil(sqrt(HCF))):
	if HCF % i == 0:
		count = count + 2
print(count)


from math import sqrt, floor, ceil
n = int(input())
a = list(map(int, input().split()))

def eucl(x, y):
	p = max(x, y)
	q = min(x, y)
	r = p % q
	while r > 0:
		p = q
		q = r
		r = p % q
	return q
r = a[0]
for i in range(1, n):
	if r == 1:
		break
	r = eucl(a[i], r)
s = 0
for i in range(2, ceil(sqrt(r))):
	if r % i == 0:
		s += 2
if r > 1:
	s += 2
	if floor(sqrt(r)) ** 2 == r:
		s += 1
else:
	s = 1
print(s)


def g(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def cd(n):
	c = 0
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			if n / i == i:
				c += 1
			else:
				c += 2
	return c
y = int(input())
x = list(map(int, input().split()))
if y == 1:
	print(cd(x[0]))
else:
	q = g(x[0], x[1])
	for i in range(2, y):
		q = g(q, x[i])
	print(cd(q))


import math

def solve(n):
	ans = 0
	sq = int(math.sqrt(n))
	for i in range(1, sq + 1):
		if n % i == 0:
			ans += 2
	if sq * sq == n:
		ans -= 1
	return ans

def main():
	n = int(input())
	a = input().split(' ')
	for i in range(0, len(a)):
		a[i] = int(a[i])
	gcd = a[0]
	for i in a:
		gcd = math.gcd(gcd, i)
	print(solve(gcd))
main()


import math
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
	g = math.gcd(g, a[i])
cnt = 0
for i in range(1, int(math.sqrt(g)) + 1):
	if g % i == 0:
		if i == g // i:
			cnt += 1
		else:
			cnt += 2
print(cnt)


def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
from math import sqrt
n = int(input())
l = [int(x) for x in input().split()]
if len(l) == 1:
	gcd = l[0]
else:
	l.sort()
	num1 = l[0]
	num2 = l[1]
	gcd = find_gcd(num1, num2)
	for i in range(2, len(l)):
		gcd = find_gcd(gcd, l[i])
c = 0
i = 1
while i <= sqrt(gcd):
	if gcd % i == 0:
		if gcd // i == i:
			c += 1
		else:
			c += 2
	i += 1
print(c)


from math import *
from functools import reduce
n = int(input())
l = list(map(int, input().split()))
g = reduce(lambda x, y: gcd(x, y), l)

def printDivisors(g):
	i = 1
	ans = 0
	while i * i < g:
		if g % i == 0:
			ans += 1
		i += 1
	for i in range(int(sqrt(g)), 0, -1):
		if g % i == 0:
			ans += 1
	return ans
print(printDivisors(g))


from math import gcd
from functools import reduce

def count_d(n):
	ans = 0
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			ans += 1
			if i != n // i:
				ans += 1
	return ans
N = int(input())
A = list(map(int, input().split()))
g = reduce(gcd, A)
ans = count_d(g)
print(ans)


import math
from functools import reduce
n = int(input())
a = map(int, input().split())
x = reduce(math.gcd, a)
i = 1
cnt = 0
while i * i < x:
	if x % i == 0:
		cnt += 2
	i += 1
if i * i == x:
	cnt += 1
print(cnt)


from sys import stdin, stdout
import math
from math import gcd, sqrt
N = int(input())
arr = [int(x) for x in stdin.readline().split()]

def sumcommDiv(a, b):
	n = gcd(a, b)
	sum = 0
	N = int(sqrt(n)) + 1
	for i in range(1, N, 1):
		if n % i == 0:
			if n / i == i:
				sum += 1
			else:
				sum += 2
	return sum
gc = arr[0]
for i in range(N):
	gc = gcd(gc, arr[i])
print(sumcommDiv(gc, gc))


from sys import stdin
from math import gcd, sqrt
n = int(next(stdin))
aa = map(int, next(stdin).split())
g = next(aa)
for a in aa:
	g = gcd(a, g)
result = 0
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		result += 2
if int(sqrt(g)) * int(sqrt(g)) == g:
	result -= 1
print(result)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def f(arr):
	l = len(arr)
	t = 0
	if l == 1:
		t = arr[0]
	else:
		t = gcd(arr[0], arr[1])
		for i in range(2, l):
			t = gcd(t, arr[i])
	f = 0
	i = 1
	last = 0
	while i <= t ** 0.5:
		last = i
		if t % i == 0:
			f += 1
		i += 1
	if last * last == t:
		f = (f - 1) * 2 + 1
	else:
		f = f * 2
	return f
n = int(input())
arr = list(map(int, input().strip().split()))
print(f(arr))


import math

def ans(num):
	count = 0
	re = 1
	r = num
	for i in range(2, int(math.sqrt(r)) + 1):
		count = 0
		if num % i == 0:
			while num % i == 0:
				count += 1
				num //= i
			re = re * (count + 1)
	if num > 1:
		re = re * 2
	return re
n = int(input())
li = [int(x) for x in input().split()]
re = li[0]
for i in li:
	re = math.gcd(re, i)
print(ans(re))


from sys import stdin, stdout
input = stdin.readline

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def divisors(x):
	res = 0
	d = 1
	while d * d <= x:
		if x % d == 0:
			res += 1
			res += d != x / d
		d += 1
	return res
n = int(input())
a = [int(i) for i in input().split()]
nwd = 0
for i in a:
	nwd = gcd(nwd, i)
print(divisors(nwd))


from math import gcd
n = int(input())
a = list(map(int, input().split()))
d = a[0]
for i in a[1:]:
	d = gcd(d, i)
c = 0
s = int(d ** 0.5)
i = 1
while i <= s:
	if d % i == 0:
		c += 2
	i += 1
if s * s == d:
	c -= 1
print(c)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

class Prime:

	def __init__(self, n):
		self.M = m = int(math.sqrt(n)) + 10
		self.A = a = [True] * m
		a[0] = a[1] = False
		self.T = t = [2]
		for j in range(4, m, 2):
			a[j] = False
		for i in range(3, m, 2):
			if not a[i]:
				continue
			t.append(i)
			for j in range(i * i, m, i):
				a[j] = False
		self.ds_memo = {}
		self.ds_memo[1] = set([1])

	def is_prime(self, n):
		return self.A[n]

	def division(self, n):
		d = collections.defaultdict(int)
		for c in self.T:
			while n % c == 0:
				d[c] += 1
				n //= c
			if n < 2:
				break
		if n > 1:
			d[n] += 1
		return d.items()

	def divisions(self, n):
		if n in self.ds_memo:
			return self.ds_memo[n]
		for c in self.T:
			if n % c == 0:
				rs = set([c])
				for cc in self.divisions(n // c):
					rs.add(cc)
					rs.add(cc * c)
				self.ds_memo[n] = rs
				return rs
		rs = set([1, n])
		self.ds_memo[n] = rs
		return rs

def main():
	t = 1
	rr = []
	for _ in range(t):
		n = I()
		a = LI()
		g = a[0]
		for c in a[1:]:
			g = math.gcd(g, c)
		pr = Prime(g)
		rr.append(len(pr.divisions(g)))
	return JA(rr, '\n')
print(main())


from fractions import gcd
from math import sqrt

def countFactors(n):
	s = int(sqrt(n))
	c = 0
	for i in range(1, s + 1):
		if n % i == 0:
			if i != n / i:
				c += 2
			else:
				c += 1
	return c
(n, data) = (int(input()), [int(i) for i in input().strip().split()])
g = data[0]
for i in range(1, n):
	g = gcd(g, data[i])
print(countFactors(g))


def gcd(a, b):
	if not b:
		return a
	return gcd(b, a % b)

def tau(n):
	i = 1
	count = 0
	while i * i <= n:
		if n % i == 0:
			j = n / i
			count += 1
			if i != j:
				count += 1
		i += 1
	return count
n = int(input())
nums = input().split()
_gcd = int(nums[0])
for num in nums:
	_gcd = gcd(_gcd, int(num))
print(tau(_gcd))


n = int(input())
A = [int(i) for i in input().split()]

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
g = A[0]
for i in A:
	g = gcd(g, i)
fct = []
for i in range(1, g + 1):
	if i * i > g:
		break
	if g % i == 0:
		fct.append(i)
		fct.append(g // i)
print(len(set(fct)))


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def gcdOfArray(l):
	if len(l) == 1:
		return l[0]
	half = []
	j = 0
	if len(l) % 2 == 0:
		j = len(l) - 2
	else:
		j = len(l) - 3
	i = 0
	while i <= j:
		half.append(gcd(l[i], l[i + 1]))
		i += 2
	if len(l) % 2 == 1:
		half.append(l[len(l) - 1])
	return gcdOfArray(half)

def main():
	n = int(input())
	aStr = input()
	a = aStr.split(' ')
	l = []
	for e in a:
		l.append(int(e))
	g = gcdOfArray(l)
	num = 0
	limit = int(math.sqrt(g))
	for i in range(1, limit + 1):
		if g % i == 0:
			j = g / i
			if i == j:
				num += 1
			else:
				num += 2
	print(num)
main()


import math

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	return gcd(b, a % b)

def g(k):
	d = k[0]
	for i in range(1, len(k)):
		d = gcd(d, k[i])
	return d
a = int(input())
k = list(map(int, input().split()))
c = 0
b = g(k)
for i in range(1, math.floor(math.sqrt(b)) + 1):
	if b // i == math.floor(math.sqrt(b)) and b % i == 0:
		c += 1
	elif b % i == 0:
		c += 2
print(c)


import math
n = int(input())
a = input().split()
g = int(a[0])
for i in range(1, n):
	g = math.gcd(g, int(a[i]))
ans = 0
for i in range(1, int(math.sqrt(g)) + 1):
	if g % i == 0:
		if g / i == i:
			ans += 1
		else:
			ans += 2
print(ans)


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(1):
		n = ri()
		a = ria()
		a = sorted(a)
		c = 0
		g = a[0]
		for i in range(1, n):
			g = math.gcd(a[i], g)
		z = []
		for i in range(1, int(math.sqrt(g)) + 1):
			if g % i == 0:
				z.append(g // i)
				z.append(g // (g // i))
		print(len(set(z)))
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


import math
t = int(input())
list = input().split()
val = []
for i in range(t):
	val.append(int(list[i]))
gcd = val[0]
for i in range(1, t):
	gcd = math.gcd(gcd, val[i])
ans = 0
for i in range(1, int(math.sqrt(gcd)) + 1):
	if gcd % i == 0:
		if i * i == gcd:
			ans = ans + 1
		else:
			ans = ans + 2
print(ans)


import math
n = int(input())
nums = [int(x) for x in input().split()]
gc = nums[0]
if len(nums) > 1:
	gc = math.gcd(nums[0], nums[1])
	for x in range(2, n):
		gc = math.gcd(gc, nums[x])
c = 2 if gc > 1 else 1
for x in range(2, int(math.sqrt(gc)) + 1):
	if gc % x == 0:
		c += 2 if gc // x != x else 1
print(c)


from math import gcd
n = int(input())
arr = list(map(int, input().split()))
hasil = arr[0]
anu = 0
for i in range(1, n):
	hasil = gcd(hasil, arr[i])
i = 1
while i * i <= hasil:
	if hasil % i == 0:
		anu += 1
		if i * i != hasil:
			anu += 1
	i += 1
print(anu)


from math import sqrt, gcd
n = int(input())
arr = list(map(int, input().split()))
g = arr[0]
for i in range(1, n):
	g = gcd(g, arr[i])
ans = 0
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		if g // i == i:
			ans += 1
		else:
			ans += 2
print(ans)


from math import sqrt, ceil

def commonDivisorsOf(array):
	for factor in factorsOf(array.pop(0)):
		if all((not value % factor for value in array)):
			return nFactorsOf(factor)

def factorsOf(n):
	if n == 1:
		yield 1
		return
	(factorsStorage, squareRoot_n) = ([], sqrt(n))
	limit = ceil(squareRoot_n)
	for value in range(1, limit):
		if not n % value:
			yield (n / value)
			factorsStorage.append(value)
	if squareRoot_n == limit:
		yield limit
	factorsStorage.reverse()
	for factor in factorsStorage:
		yield factor

def nFactorsOf(n):
	if n == 1:
		return 1
	squareRoot_n = sqrt(n)
	limit = ceil(squareRoot_n)
	nFactors = sum((2 for value in range(1, limit) if not n % value))
	return nFactors + 1 if squareRoot_n == limit else nFactors
input()
print(commonDivisorsOf(list(set(map(int, input().split(' '))))))


from math import *
n = int(input())
arr = list(map(int, input().split()))
el = arr[0]
for i in range(1, n):
	el = gcd(el, arr[i])
d = [1]
for i in range(2, int(sqrt(el)) + 1):
	if el % i == 0:
		if el % (el // i) == 0 and i != el // i:
			d.append(el // i)
		d.append(i)
if el != 1:
	d.append(el)
print(len(d))


def gcd(x, y):
	while y != 0:
		(x, y) = (y, x % y)
	return x
n = int(input())
a = []
a = list(map(int, input().split()))
g = a[0]
if n != 1:
	for i in a[1:]:
		g = gcd(g, i)
s = 0
for i in range(1, int(g ** (1 / 2) + 1)):
	if g % i == 0:
		if g // i != i:
			s += 1
		s += 1
print(s)


(z, zz) = (input, lambda : list(map(int, z().split())))
zzz = lambda : [int(i) for i in stdin.readline().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)

def solve(n):
	res = 0
	i = 1
	while i * i <= n:
		if n % i == 0:
			res += 1
			if i != n // i:
				res += 1
		i += 1
	return res
for _ in range(1):
	n = int(z())
	lst = szzz()
	x = lst[0]
	for i in range(1, n):
		x = gcd(x, lst[i])
		if x <= 1:
			break
	print(solve(x))


import math

def simpleSieve(sieveSize):
	sieve = [True] * (sieveSize + 1)
	sieve[0] = False
	sieve[1] = False
	for i in range(2, int(math.sqrt(sieveSize)) + 1):
		if sieve[i] == False:
			continue
		for pointer in range(i ** 2, sieveSize + 1, i):
			sieve[pointer] = False
	primes = []
	for i in range(sieveSize + 1):
		if sieve[i] == True:
			primes.append(i)
	return primes

def sigmaf(n):
	sieveSize = 10 ** 6
	primes = simpleSieve(sieveSize)
	i = 0
	s = 1
	p = 1
	while n != 1:
		if i == len(primes):
			return p * 2
		if n % primes[i] == 0:
			n //= primes[i]
			s += 1
		else:
			i += 1
			p *= s
			s = 1
	return p * s
n = int(input())
L = list(map(int, input().split()))
p = L[0]
for i in range(1, n):
	p = math.gcd(p, L[i])
print(sigmaf(p))


from math import gcd
from functools import reduce

def find_gcd(list):
	x = reduce(gcd, list)
	return x

def factors(n):
	result = set()
	for i in range(1, int(n ** 0.5) + 1):
		(div, mod) = divmod(n, i)
		if mod == 0:
			result |= {i, div}
	return len(result)
n = int(input())
a = list(map(int, input().split(' ')))
if n == 1:
	if a[-1] == 1:
		print(1)
		exit()
x = find_gcd(a)
print(factors(x))


from math import sqrt, factorial

def gcd(a, b):
	while a != 0 and b != 0:
		if a > b:
			a = a % b
		else:
			b = b % a
	return max(a, b)

def div_counter(num):
	divs = 0
	for i in range(1, int(sqrt(num) + 1)):
		if num % i == 0:
			divs += 1
			if i * i != num:
				divs += 1
	return divs
n = int(input())
numbers = [int(i) for i in input().split()]
if n != 1:
	g = gcd(numbers[0], numbers[1])
	for i in range(2, n):
		g = gcd(g, numbers[i])
	print(div_counter(g))
else:
	print(div_counter(numbers[0]))


import math
import sys
n = int(input())
a = list(map(int, input().split()))
gosagu = a[0]
for i in range(1, n):
	gosagu = math.gcd(gosagu, a[i])
	if gosagu == 1:
		print(1)
		sys.exit()
i = 1
cnt = 0
while i * i <= gosagu:
	if i * i == gosagu:
		cnt += 1
	elif gosagu % i == 0:
		cnt += 2
	i += 1
print(cnt)


def hcfnaive(a, b):
	if b == 0:
		return a
	else:
		return hcfnaive(b, a % b)
n = int(input())
l = list(map(int, input().split()))
g = l[0]
for i in range(1, n):
	g = hcfnaive(g, l[i])
f = 0
for i in range(1, int(g ** 0.5) + 1):
	if g % i == 0 and g // i != i:
		f = f + 2
	elif g // i == i and g % i == 0:
		f = f + 1
print(f)


import math
qtd = int(input())
nums = list(set(map(int, input().split())))

def gcd(a, b):
	while b > 0:
		(a, b) = (b, a % b)
	return a

def max_gcd(list):
	result = list[0]
	for i in list[1:]:
		result = gcd(result, i)
	return result
limit = max_gcd(nums)
resp = 0
for i in range(1, math.ceil(math.sqrt(limit + 1))):
	if limit % i == 0:
		resp += 1
		if limit != i ** 2 and limit % (limit / i) == 0:
			resp += 1
print(resp)


def int_multiple():
	return [int(c) for c in input().split()]

def int_single():
	return int(input())

def str_multiple():
	return [c for c in input().split()]

def str_single():
	return input()
import math

def countDivisors(n):
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt
n = int_single()
l = sorted(int_multiple())
if n < 2:
	print(countDivisors(l[0]))
else:
	curr = l[0]
	for i in range(1, n):
		curr = math.gcd(curr, l[i])
		if curr == 1:
			break
	print(countDivisors(curr))


import io, sys, atexit, os
import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations
from itertools import combinations

def li():
	return list(map(int, input().split()))

def num():
	return map(int, input().split())

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	gg = find_gcd(x, y)
	return x * y // gg

def printDivisors(n):
	i = 1
	cc = 0
	while i <= ma.sqrt(n):
		if n % i == 0:
			if n / i == i:
				cc += 1
			else:
				cc += 2
		i = i + 1
	return cc
mm = 1000000007
yp = 0

def solve():
	t = 1
	for tt in range(t):
		n = nu()
		a = li()
		gg = 0
		for i in range(n):
			gg = find_gcd(gg, a[i])
		cc = 0
		print(printDivisors(gg))
solve()


from math import gcd
from math import sqrt
n = int(input())
l = list(map(int, input().split()))[:n]
x = l[0]
for i in l[1:]:
	x = gcd(x, i)
e = 0
for i in range(1, int(sqrt(x)) + 1):
	if x % i == 0:
		if x // i == i:
			e += 1
		else:
			e += 2
print(e)


import sys
input = sys.stdin.readline
from fractions import gcd
from math import sqrt

def countFactors(n):
	s = int(sqrt(n))
	c = 0
	for i in range(1, s + 1):
		if n % i == 0:
			if i != n / i:
				c += 2
			else:
				c += 1
	return c
(n, data) = (int(input()), list(map(int, input().split())))
g = data[0]
for i in range(1, n):
	g = gcd(g, data[i])
print(countFactors(g))


def rwh_primes(n):
	sieve = [True] * n
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i]:
			sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
	return [2] + [i for i in range(3, n, 2) if sieve[i]]
primes = rwh_primes(10 ** 6)

def divs(n):
	r = 1
	for p in primes:
		if n % p == 0:
			temp = 1
			while n % p == 0:
				n //= p
				temp += 1
			r *= temp
			if n == 1:
				break
	if n > 1:
		r *= 2
	return r
from math import gcd
n = int(input())
x = map(int, input().split())
r = next(x)
for v in x:
	r = gcd(r, v)
print(divs(r))


from sys import stdin
import math

def calc_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
a = [int(x) for x in input().split()]
gcd = 0
for i in a:
	gcd = calc_gcd(gcd, i)
ans = 0
i = 1
while i * i <= gcd:
	if gcd % i == 0:
		ans += 1
		if i * i != gcd:
			ans += 1
	i += 1
print(ans)


from math import sqrt, ceil, floor

def get_num_divisors(x):
	ds = set()
	for i in range(1, ceil(sqrt(x + 1))):
		if not x % i:
			ds.add(i)
	ts = set()
	for d in ds:
		m = floor(x / d)
		if not x % d and m not in ds:
			ts.add(m)
	return len(ds) + len(ts)

def get_gcd(x, y):
	if y > x:
		return get_gcd(y, x)
	m = x % y
	if not m:
		return y
	return get_gcd(y, m)

def get_array_gcd(a):
	lgcd = a[0]
	for x in a:
		lgcd = get_gcd(lgcd, x)
	return lgcd

def get_array_num_divisors(a):
	gcd = get_array_gcd(a)
	return get_num_divisors(gcd)
input()
print(get_array_num_divisors(list(map(int, input().split()))))


import math
import sys
from collections import defaultdict

def main():
	n = int(input())
	a = list(map(int, input().split()))
	g = a[0]
	primes = [True] * 1000001
	primes[0] = primes[1] = False
	for i in range(2, 1001):
		if primes[i]:
			j = i * i
			while j < len(primes):
				primes[j] = False
				j += i
	plist = []
	for i in range(len(primes)):
		if primes[i]:
			plist.append(i)
	for i in range(1, n):
		g = math.gcd(g, a[i])
	res = 1
	pos = 0
	while g > 1 and pos < len(plist):
		divs = 0
		while g % plist[pos] == 0:
			divs += 1
			g //= plist[pos]
		res *= divs + 1
		pos += 1
	if g > 1:
		res *= 2
	print(res)
main()


from math import gcd
n = int(input())
p = list(map(int, input().split()))
v = p[0]
for i in p[1:]:
	v = gcd(v, i)
ans = 0
for i in range(1, int(v ** 0.5) + 1):
	if v % i == 0:
		if v // i == i:
			ans += 1
		else:
			ans += 2
print(ans)


import math
from functools import reduce

def gcd_list(nums):
	return reduce(math.gcd, nums)
n = int(input())
a = list(map(int, input().split()))
g = gcd_list(a)
cnt = 0
for i in range(int(math.sqrt(g))):
	if g % (i + 1) == 0:
		cnt += 1
		if (i + 1) * (i + 1) != g:
			cnt += 1
print(cnt)


from math import sqrt

def magic(a, b):
	(a, b) = (max(a, b), min(a, b))
	while b > 0:
		(a, b) = (b, a % b)
	return a
input()
a = [int(q) for q in input().split()]
r = a[0]
for i in a[1:]:
	r = magic(r, i)
	if r == 1:
		break
if r == 1:
	print(1)
else:
	k = 0
	q = int(sqrt(r))
	for i in range(1, q + 1):
		if r % i == 0:
			k += 2
	if q * q == r:
		k -= 1
	print(k)


import math
n = int(input())
l = list(set(map(int, input().split())))

def fc(x):
	a = 0
	for i in range(1, int(x ** 0.5) + 1):
		if x % i == 0:
			a += 1
	return a
a = len(l)
if a != 1:
	x = math.gcd(l[0], l[1])
	for i in range(2, a):
		x = math.gcd(x, l[i])
else:
	x = l[0]
if x == 1:
	print(1)
elif int(x ** 0.5) == x ** 0.5:
	print(2 * fc(x) - 1)
else:
	print(2 * fc(x))


n = int(input())
A = list(map(int, input().split()))
a = A[0]
for i in range(n - 1):
	b = A[i + 1]
	(a, b) = (max(a, b), min(a, b))
	while b > 0:
		(a, b) = (b, a % b)
d = 2
x = 1
if a > 1:
	x += 1
while d * d < a:
	if a % d == 0:
		x += 2
	d += 1
if d * d == a:
	x += 1
print(x)


def countDivisors(n):
	cnt = 0
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
l = list(map(int, input().split()))
if n == 1:
	print(countDivisors(l[0]))
else:
	hcf = gcd(l[0], l[1])
	for i in range(2, n):
		hcf = gcd(hcf, l[i])
	print(countDivisors(hcf))


from sys import stdin, stdout
from math import gcd
n = int(input())
l = list(map(int, stdin.readline().split()))
l.sort()
a = l[0]
ans = True
for i in range(n - 1):
	a = gcd(a, l[i + 1])
	if a == 1:
		print(1)
		ans = False
		break
if ans == True:
	c = 0
	for i in range(1, int(a ** 0.5) + 1):
		if a % i == 0:
			c += 1
			if i != a // i:
				c += 1
	print(c)


from math import floor, sqrt
try:
	long
except NameError:
	long = int

def fac(n):
	step = lambda x: 1 + (x << 2) - (x >> 1 << 1)
	maxq = long(floor(sqrt(n)))
	d = 1
	q = n % 2 == 0 and 2 or 3
	while q <= maxq and n % q != 0:
		q = step(d)
		d += 1
	return q <= maxq and [q] + fac(n // q) or [n]
n = int(input())
a = list(map(int, input().split()))
import math
b = a[0]
for i in a:
	b = math.gcd(i, b)
l = fac(b)
l1 = len(l)
d = {}
for i in l:
	try:
		d[i] += 1
	except KeyError:
		d[i] = 1
ans = 1
for i in d.values():
	ans *= i + 1
if 1 in l:
	print(ans - 1)
else:
	print(ans)


from math import gcd as g
input()
a = list(map(int, input().split()))
s = a[0]
f = 0
for i in a:
	s = g(s, i)
k = s ** 0.5
for i in range(1, int(k) + 1):
	f += 2 * (not s % i)
print(f - (k % 1 == 0))


import math

def counter(n):
	z = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				z.append(i)
			else:
				z.append(i)
				z.append(n / i)
		i += 1
	print(len(z))
n = int(input())
a = list(map(int, input().split()))
if n == 1:
	counter(a[0])
else:
	gc = math.gcd(a[0], a[1])
	for i in range(2, n):
		gc = math.gcd(gc, a[i])
	counter(gc)


n = int(input())
nums = [int(x) for x in input().split()]

def max_divisor(x, y):
	(x, y) = (min(x, y), max(x, y))
	while y % x != 0:
		y = y % x
		(x, y) = (y, x)
	return x
import math
factor = nums[0]
for x in nums:
	factor = max_divisor(x, factor)
result = 0
bound = factor ** 0.5
i = 1
while i < bound:
	if factor % i == 0:
		result += 2
	i = i + 1
if i == bound:
	result += 1
print(result)


from functools import reduce
from itertools import accumulate, islice
from math import gcd, sqrt
N = int(input())
nums = [int(i) for i in input().split()]
gcd_ = reduce(lambda x, y: gcd(x, y), nums)
count = 0
for i in range(1, int(sqrt(gcd_)) + 1):
	if gcd_ % i == 0:
		count += 2
if sqrt(gcd_) == int(sqrt(gcd_)):
	count -= 1
print(count)


from math import gcd

def factor(n):
	global c
	d = 1
	while d * d <= n:
		if n % d == 0:
			c += 1
			if d * d != n:
				c += 1
		d += 1
n = int(input())
a = list(map(int, input().split()))
pr = [a[0]]
c = 0
for i in range(1, n):
	pr.append(gcd(pr[-1], a[i]))
factor(pr[-1])
print(c)


import sys
num1 = int(sys.stdin.readline())
a = list(map(int, sys.stdin.readline().split()))
import math
k = []

def common_divisor(a, b):
	if b == 0:
		return a
	else:
		return common_divisor(b, a % b)
cd = a[0]
for i in range(len(a)):
	cd = common_divisor(max(cd, a[i]), min(cd, a[i]))
for i in range(1, int(math.sqrt(cd)) + 1):
	if cd % i == 0:
		if i != cd // i:
			k += [i] + [cd // i]
		else:
			k += [i]
k.sort()
print(len(k))


import math
n = int(input())
l = list(map(int, input().split()))
g = l[0]
for i in range(1, n):
	g = math.gcd(l[i], g)
c = 0
for i in range(1, int(math.sqrt(g)) + 1):
	if g % i == 0:
		c += 1
		if g / i != i:
			c += 1
print(c)


from math import gcd
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
if g > 1:
	c = 2
	i = 2
	while i * i < g:
		if g % i == 0:
			c += 2
		i += 1
	if i * i == g:
		c += 1
	print(c)
else:
	print(1)


from sys import stdin
import math

def get_divisors(n):
	i = 1
	count = 0
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				count += 1
			else:
				count += 2
		i = i + 1
	return count
n = int(stdin.readline().strip())
arr = list(map(int, stdin.readline().split()))
g = arr[0]
for i in range(1, n):
	g = math.gcd(g, arr[i])
print(get_divisors(g))


import math

def make_divisors(n):
	from collections import deque
	divisors = deque([])
	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)
	lst_divisors = list(divisors)
	lst_divisors.sort()
	return lst_divisors
n = int(input())
A = list(map(int, input().split()))
a = A[0]
for i in range(1, n):
	a = math.gcd(a, A[i])
print(len(make_divisors(a)))


import math

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
n = int(input())
a = list(map(int, input().split()))
sorted(a)
g = 0
if len(a) == 1:
	g = a[0]
else:
	g = gcd(a[0], a[1])
	for i in range(2, n):
		g = gcd(g, a[i])
ans = 0
limit = math.floor(math.sqrt(g))
for i in range(1, limit + 1):
	if g % i == 0:
		ans += 1
ans *= 2
if limit == math.sqrt(g):
	ans -= 1
print(ans)


import sys
import math

def read_line():
	return sys.stdin.readline()[:-1]

def read_int():
	return int(sys.stdin.readline())

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def printDivisors(n):
	i = 1
	count = 0
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				count += 1
			else:
				count += 2
		i = i + 1
	return count
n = read_int()
a = read_int_line()
l = a[0]
for i in range(1, n):
	l = gcd(l, a[i])
ans = printDivisors(l)
print(ans)


from sys import stdin, stdout

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
write = stdout.write
n = int(stdin.readline())
numbers = [int(i) for i in stdin.readline().split()]
anterior = numbers[0]
for i in range(1, n):
	anterior = gcd(anterior, numbers[i])
ans = 0
i = 1
divisores = 0
while i * i < anterior:
	if anterior % i == 0:
		divisores += 2
	i += 1
if i * i == anterior:
	divisores += 1
print(divisores)


import math
n = int(input())
a = list(map(int, input().split()))
g = 0
for i in a:
	g = math.gcd(i, g)
ans = set()
for i in range(1, int(g ** 0.5) + 1):
	if g % i == 0:
		ans.add(i)
		ans.add(g // i)
print(len(ans))


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt, gcd, floor
import unittest

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
n = read_int()
a = read_int_array()
d = a[0]
for e in a[1:]:
	d = gcd(d, e)
if d == 1:
	print(1)
	exit()
divisors = 2
for x in range(2 if d % 2 == 0 else 3, int(d ** 0.5) + 1, 1 if d % 2 == 0 else 2):
	if d % x == 0:
		divisors += 2
if d ** 0.5 % 1 == 0:
	divisors -= 1
print(divisors)


from math import sqrt
from collections import defaultdict

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
lis = list(map(int, input().split()))
lis = sorted(set(lis), reverse=True)
n = len(lis)
g = lis[0]
for i in lis:
	g = gcd(i, g)
d = defaultdict(int)
for i in range(2, int(sqrt(g)) + 1):
	while g % i == 0:
		d[i] += 1
		g //= i
if g > 1:
	d[g] += 1
p = 1
for i in d.values():
	p *= i + 1
print(p)


import sys
input = sys.stdin.buffer.readline
from math import gcd, sqrt
n = int(input())
a = list(set([int(i) for i in input().split()]))
a.sort()
gd = []
g = a[0]
for i in a[1:]:
	g = gcd(g, i)
st = set()
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		st.add(i)
		st.add(g // i)
print(len(st))


def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def fac(n):
	c = 0
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			c += 2
	if int(n ** 0.5) ** 2 == n:
		c -= 1
	return c
n = int(input())
lst = list(map(int, input().split()))
x = lst[0]
for i in range(1, n):
	x = gcd(x, lst[i])
print(fac(x))


import math

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
n = int(input())
a = list(map(int, input().split()))
val = a[0]
for i in range(1, n):
	val = gcd(val, a[i])
ans = 0
temp = math.sqrt(val)
for i in range(1, int(temp) + 1):
	if val % i == 0:
		ans += 2
temp = round(temp)
if temp * temp == val:
	ans -= 1
print(ans)


from sys import stdin
n = int(stdin.readline().strip())
a = [int(i) for i in stdin.readline().strip().split()]

def gcd(a, b):
	(a, b) = (min(a, b), max(a, b))
	while True:
		if a % b == 0:
			return b
		else:
			(a, b) = (b, a % b)
a = list(sorted(set(a)))
d = min(a)
for e in a:
	d = gcd(e, d)
divs = set()
for m in range(1, d + 1):
	if m ** 2 > d:
		break
	if d % m == 0:
		divs.add(m)
		divs.add(d // m)
print(len(divs))


import math

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
n = int(input())
arr = [int(k) for k in input().split()]
if n == 1:
	ans = 0
	gc = arr[0]
	for i in range(1, int(math.sqrt(gc) + 1)):
		if gc % i == 0 and gc // i != i:
			ans += 2
		elif gc % i == 0 and gc // i == i:
			ans += 1
	print(ans)
else:
	gc = 1
	for i in range(1, n):
		if i == 1:
			gc = gcd(arr[i - 1], arr[i])
		else:
			gc = gcd(gc, arr[i])
	ans = 0
	for i in range(1, int(math.sqrt(gc) + 1)):
		if gc % i == 0 and gc // i != i:
			ans += 2
		elif gc % i == 0 and gc // i == i:
			ans += 1
	print(ans)


from math import gcd
n = int(input())
ar = list(map(int, input().split()))
g = ar[0]
for i in range(1, n):
	g = gcd(g, ar[i])
i = 1
ans = 0
if g == 1:
	print(1)
else:
	while i * i <= g:
		if g % i == 0:
			if i * i != g:
				ans += 2
			else:
				ans += 1
		i += 1
	print(ans)


from fractions import gcd
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def find_gcd(list):
	x = reduce(gcd, list)
	return x
m = input()
m = int(m)
n = list(map(int, input().split()))
g = find_gcd(n)
l = len(factors(g))
print(l)


import math
n = int(input())
l = [int(i) for i in input().split()]
hcf = l[0]
for i in range(1, n):
	hcf = math.gcd(hcf, l[i])
count = 0
if hcf == 1:
	count = 1
else:
	for i in range(1, int(math.sqrt(hcf)) + 1):
		if hcf % i == 0:
			count += 2
	t = int(math.sqrt(hcf))
	if t * t == hcf:
		count -= 1
print(count)


from sys import stdin
input = stdin.readline
from math import sqrt, floor

def lcd(x, y):
	(x, y) = (max([x, y]), min([x, y]))
	while y > 0:
		(x, y) = (y, x % y)
	return x
n = int(input())
a = [int(i) for i in input().split()]
div = a[0]
for i in range(n):
	div = lcd(div, a[i])
res = 0
top = floor(sqrt(div))
for i in range(1, top + 1):
	if div % i == 0:
		res += 2
if div == top ** 2:
	res -= 1
print(res)


n = int(input())
a = list(map(int, input().split()))
z = min(a)
for x in a:
	while x % z != 0:
		(x, z) = (z, x % z)
ans = 0
for i in range(1, 10 ** 6 + 1):
	if z % i == 0:
		j = z // i
		if i < j:
			ans += 2
		if i == j:
			ans += 1
print(ans)


import math
n = int(input())
lista = [int(x) for x in input().split()]
lista.sort()
a = lista[0]
temp = 0
for x in range(n):
	a = math.gcd(a, lista[x])
for x in range(n):
	if lista[x] % a != 0:
		temp = 1
		break
	else:
		continue
if temp == 1:
	print(1)
else:
	count = 0
	for x in range(1, int(math.sqrt(a)) + 1):
		if a % x == 0:
			if x == int(a / x):
				count += 1
			else:
				count += 2
	print(count)


n = int(input())

def gcd(a, b):
	while b > 0:
		(a, b) = (b, a % b)
	return a
a = list(map(int, input().split()))
result = a[0]
for i in a[1:]:
	result = gcd(result, i)

def printDivisors(result):
	count = 0
	countList = []
	i = 1
	while i <= result ** (1 / 2):
		if result % i == 0 and i != result ** (1 / 2):
			count += 2
		elif i == result ** (1 / 2):
			count += 1
		i += 1
	print(count)
printDivisors(result)


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
t = int(input())
s = input()
list = s.split()
for i in range(len(list)):
	list[i] = int(list[i])
ans = list[0]
for i in range(1, len(list)):
	ans = gcd(ans, list[i])
num = 0
for i in range(1, math.floor(math.sqrt(ans)) + 1):
	if ans % i == 0:
		num += 2
if math.floor(math.sqrt(ans)) == math.sqrt(ans):
	num -= 1
print(num)


def factorNo(n):
	count = 0
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			count += 2
	if int(n ** 0.5) ** 2 == n:
		count -= 1
	return count

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
n = int(input())
arr = list(map(int, input().split()))
num = arr[0]
c = arr[0] + 1
for i in range(1, n):
	num = gcd(num, arr[i])
print(factorNo(num))


import math
import sys
import collections

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
n = ii()
d = li()
r = d[0]
for i in range(1, n):
	r = math.gcd(r, d[i])
res = 0
for i in range(1, int(math.sqrt(r) + 1)):
	if r % i == 0:
		res += 2 if r // i != i else 1
print(res)


from math import sqrt

def gcd(a, b):
	rem = b
	while rem > 0:
		rem = a % b
		a = b
		b = rem
	return a

def numfactor(n):
	count = 0
	for k in range(2, int(sqrt(n) + 1)):
		if n % k == 0:
			count += 2
	root = sqrt(n)
	if int(root) == root:
		count = count - 1
	return count + 2
n = int(input())
a = [int(i) for i in input().split(' ')]
if n == 1:
	print(numfactor(a[0]))
else:
	gcd1 = gcd(a[0], a[1])
	for k in range(2, n):
		gcd1 = gcd(a[k], gcd1)
	print(numfactor(gcd1))


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

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
res = gcd(a[0], a[0])
for i in range(1, n):
	res = gcd(res, a[i])
li = {1}
for i in range(1, int(res ** 0.5) + 1):
	if res % i == 0:
		li.add(i)
		li.add(res // i)
print(len(li))


import sys
import math
import collections
import bisect

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()

def printDivisors(n):
	count = 0
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				count += 1
			else:
				count += 2
		i = i + 1
	return count
for t in range(1):
	n = int(input())
	arr = get_list()
	gcd = arr[0]
	for i in range(1, n):
		gcd = math.gcd(gcd, arr[i])
	ans = printDivisors(gcd)
	print(ans)


import sys, math, bisect
from collections import defaultdict

def pow(a, b):
	res = 1
	while b > 0:
		if b & 1:
			res *= a
		a *= a
		b >>= 1
	return res

def powmod(a, b, m):
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a *= a
		b >>= 1
	return res

def inv(a, m):
	return powmod(a, m - 2, m)

def SieveOfEratosthenes(n, prime, primesquare, a):
	for i in range(2, n + 1):
		prime[i] = True
	for i in range(n * n + 1 + 1):
		primesquare[i] = False
	prime[1] = False
	p = 2
	while p * p <= n:
		if prime[p] == True:
			i = p * 2
			while i <= n:
				prime[i] = False
				i += p
		p += 1
	j = 0
	for p in range(2, n + 1):
		if prime[p] == True:
			a[j] = p
			primesquare[p * p] = True
			j += 1

def countDivisors(n):
	if n == 1:
		return 1
	prime = [False] * (n + 2)
	primesquare = [False] * (n * n + 2)
	a = [0] * n
	SieveOfEratosthenes(n, prime, primesquare, a)
	ans = 1
	i = 0
	while 1:
		if a[i] * a[i] * a[i] > n:
			break
		cnt = 1
		while n % a[i] == 0:
			n = n / a[i]
			cnt = cnt + 1
		ans = ans * cnt
		i += 1
	n = int(n)
	if prime[n] == True:
		ans = ans * 2
	elif primesquare[n] == True:
		ans = ans * 3
	elif n != 1:
		ans = ans * 4
	return ans

def cd(n):
	if n == 1:
		return 1
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt
t = 1
for _ in range(t):
	n = int(input())
	a = [int(s) for s in input().split(' ')]
	if n == 1:
		print(cd(a[0]))
		continue
	gd = math.gcd(a[0], a[1])
	for i in range(2, n):
		gd = math.gcd(gd, a[i])
	print(cd(gd))


from math import sqrt

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(n - 1):
	g = gcd(g, a[i + 1])
total = 1
for i in range(2, int(sqrt(g)) + 1):
	cnt = 0
	while g % i == 0:
		cnt += 1
		g //= i
	total *= cnt + 1
if g > 1:
	total *= 2
print(total)


n = int(input())
lst = list(map(int, input().split()))
item = lst[0]
from math import gcd
for (i, x) in enumerate(lst[1:]):
	item = gcd(item, x)
(res, k, y) = (0, 0, int(item ** 0.5) + 1)
for i in range(1, y):
	if item % i == 0:
		if item // i == i:
			res += 1
		else:
			res += 2
print(res)


from fractions import gcd
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def find_gcd(list):
	x = reduce(gcd, list)
	return x
a = int(input())
b = list(map(int, input().split()))
y = find_gcd(b)
print(len(factors(y)))


def gcd(x, y):
	return x if y == 0 else gcd(y, x % y)
n = int(input())
a = list(map(int, input().split(' ')))
g = 0
for i in a:
	g = gcd(g, i)
ans = 0
i = 1
while i * i <= g:
	if g % i == 0:
		ans += 1
		if i != g // i:
			ans += 1
	i += 1
print(ans)


import math
import collections

def prime_factor(n):
	ass = []
	for i in range(2, int(n ** 0.5) + 1):
		while n % i == 0:
			ass.append(i)
			n = n // i
	if n != 1:
		ass.append(n)
	return ass
n = int(input())
nums = list(map(int, input().split(' ')))
g = nums[0]
for i in range(1, n):
	g = math.gcd(g, nums[i])
primes = prime_factor(g)
c = collections.Counter(primes)
out = 1
for val in c.values():
	out *= val + 1
print(out)


from fractions import gcd
n = int(input())
ans = 0
for i in list(map(int, input().split())):
	ans = gcd(ans, i)
i = 1
ANS = 0
while i * i < ans:
	if ans % i == 0:
		ANS += 2
	i += 1
if i * i == ans:
	ANS += 1
print(ANS)


from math import gcd, sqrt

def no(n):
	ans = 1
	count = 1
	while n % 2 == 0:
		count += 1
		n = n // 2
	ans *= count
	for i in range(3, int(sqrt(n)) + 1, 2):
		count = 1
		while n % i == 0:
			count += 1
			n = n // i
		ans *= count
	if n > 2:
		ans *= 2
	return ans
n = int(input())
arr = list(map(int, input().split(' ')))
gcdi = arr[0]
for i in range(1, n):
	gcdi = gcd(gcdi, arr[i])
print(no(gcdi))


from math import gcd
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
(ans, i) = (0, 1)
while i * i <= g:
	if g % i == 0:
		ans += 1
		if g // i != i:
			ans += 1
	i += 1
print(ans)


from math import gcd
from functools import reduce
n = int(input())
a = [int(i) for i in input().split()]
kek = reduce(gcd, a)
i = 1
mem = []
if kek == 1:
	print(1)
	quit()
while i ** 2 <= kek:
	if kek % i == 0:
		mem.append(i)
		mem.append(kek // i)
	i += 1
print(len(set(mem)))


from math import gcd, sqrt
n = int(input())
s = list(map(int, input().split()))
g = s[0]
for i in s:
	g = gcd(g, i)
ans = 0
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		ans += len({i, g // i})
print(ans)


def gcd(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a
nod = 1

def mas_gcd(ass=list):
	new = []
	number = len(ass)
	if number % 2 == 1:
		new.append(ass[number // 2])
	for i in range(number // 2):
		new.append(gcd(ass[i], ass[-1 - i]))
	if len(new) == 1:
		a = new[0]
		global nod
		nod = new[0]
	else:
		mas_gcd(new)
deles = dict()

def first_del(n):
	if_prime = True
	for i in range(2, int(n ** 0.5 + 1)):
		if n % i == 0:
			deles[i] = deles.get(i, 0) + 1
			if_prime = False
			first_del(n // i)
			break
	if if_prime and n != 1:
		deles[n] = deles.get(n, 0) + 1
n = int(input())
mas = input().split()
for j in range(n):
	mas[j] = int(mas[j])
mas_gcd(mas)
first_del(nod)
ans = 1
for value in deles.values():
	ans *= value + 1
print(ans)


from math import gcd
from functools import reduce

def divisors(n):
	divs = [1, n]
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			divs.extend([i, n // i])
	return list(set(divs))
n = int(input())
a = [*map(int, input().split())]
g = reduce(gcd, a)
print(len(divisors(g)))


import math
n = int(input())
a = list(map(int, input().split()))
s = a[0]

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
for i in a[1:]:
	s = math.gcd(i, s)
b = make_divisors(s)
print(len(b))


import math
l = []

def printDivisors(n):
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
n = int(input())
p = input().rstrip().split(' ')
p.sort(key=int)
x = list(set(p))
F = int(p[0])
for i in range(0, len(p)):
	F = math.gcd(F, int(p[i]))
printDivisors(F)
print(len(l))


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def int1():
	return int(input())
import string
import math
from itertools import combinations

def main():
	n = int1()
	a = get_array()

	def countDivisors(n):
		cnt = 0
		for i in range(1, int(math.sqrt(n)) + 1):
			if n % i == 0:
				if n / i == i:
					cnt = cnt + 1
				else:
					cnt = cnt + 2
		return cnt

	def find_gcd(x, y):
		while y:
			(x, y) = (y, x % y)
		return x
	if n > 1:
		num1 = a[0]
		num2 = a[1]
		gcd = find_gcd(num1, num2)
		for i in range(2, len(a)):
			gcd = find_gcd(gcd, a[i])
		z = countDivisors(gcd)
		print(z)
	else:
		z = countDivisors(a[0])
		print(z)
main()


from sys import stdin, stdout
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))

def gcd(x, y):
	while x:
		(x, y) = (y % x, x)
	return y
(n,) = mp()
a = mp()
gc = a[0]
for i in range(1, n):
	gc = gcd(gc, a[i])
if gc == 1:
	cout('1')
	exit(0)
s = set()
for i in range(1, int(gc ** 0.5) + 1):
	if not gc % i:
		s.add(gc // i)
		s.add(i)
cout(str(len(s)))


import math
from math import gcd

def fac(x):
	total = 0
	if x == 1:
		return 1
	else:
		for i in range(1, int(math.sqrt(x) + 1)):
			if x % i == 0:
				if x // i != i:
					total += 2
				else:
					total += 1
	return total
a = int(input())
z = list(map(int, input().split()))
if len(z) == 1:
	print(fac(z[0]))
	exit()
x = gcd(z[0], z[1])
for i in range(1, len(z)):
	x = gcd(x, z[i])
print(fac(x))


def gcd(a, b):
	return b if a == 0 else gcd(b % a, a)
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
ans = 0
i = 1
while i * i <= g:
	if g % i == 0:
		ans += 1
		if i != g // i:
			ans += 1
	i += 1
print(ans)


def qwqw(n):
	result = set()
	for i in range(1, int(n ** 0.5) + 1):
		(div, mod) = divmod(n, i)
		if mod == 0:
			result |= {i, div}
	return len(result)

def qw(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
a = list(map(int, input().split()))
a.append(a[0])
num1 = a[0]
num2 = a[1]
gcd = qw(num1, num2)
for i in range(2, len(a)):
	gcd = qw(gcd, a[i])
print(qwqw(gcd))


import math
n = int(input())
l = list(map(int, input().split()))
if n == 1:
	g = l[0]
else:
	g = math.gcd(l[0], l[1])
	for i in range(2, n):
		g = math.gcd(g, l[i])
c = 0
for i in range(1, int(g ** 0.5) + 1):
	if g % i == 0:
		if g == i * i:
			c = c + 1
		else:
			c = c + 2
print(c)


from math import gcd
from math import sqrt

def factor(n):
	potentional_p = 3
	itog_list = {}
	if n % 2 == 0:
		itog_list[2] = 0
	while n % 2 == 0:
		n = n // 2
		itog_list[2] += 1
	while n - 1:
		if potentional_p > sqrt(n):
			if n in itog_list:
				itog_list[n] += 1
			else:
				itog_list[n] = 1
			return itog_list
		while n % potentional_p == 0:
			n = n // potentional_p
			if potentional_p in itog_list:
				itog_list[potentional_p] += 1
			else:
				itog_list[potentional_p] = 1
		potentional_p += 2
	return itog_list
n = int(input())
A = list(map(int, input().split()))
g = 1
if n == 1:
	g = A[0]
else:
	g = gcd(A[0], A[1])
	for i in range(2, n):
		g = gcd(g, A[i])
F = factor(g)
ans = 1
for i in F:
	ans *= F[i] + 1
print(ans)


def divis(n):
	l = {1, n}
	for i in range(2, int(n ** 0.5) + 1):
		if not n % i:
			l.add(i)
			l.add(n // i)
	return len(l)
from math import gcd
n = int(input())
a = list(map(int, input().split()))
prev = a[0]
for i in range(1, n):
	prev = gcd(prev, a[i])
print(divis(prev))


from functools import reduce

def gcd(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a

def divisors(x):
	c = 1
	cnt = 0
	while c * c <= x:
		if x % c == 0:
			cnt += 2 if c * c != x else 1
		c += 1
	return cnt
n = int(input())
a = [int(x) for x in input().split()]
g = reduce(lambda a, b: gcd(a, b), a)
print(divisors(g))


from math import gcd
t = int(input())
a = list(map(int, input().split()))
n = a[0]
for c in a:
	n = gcd(n, c)
ans = 1
for i in range(2, int(n ** 0.5 + 0.5) + 1):
	if n % i == 0:
		kol = 0
		for x in range(100000000):
			if n % i == 0:
				kol += 1
				n //= i
			else:
				break
		ans *= kol + 1
if n > 1:
	ans *= 2
print(ans)


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def printAllDivisors(arr, N):
	g = arr[0]
	divisors = dict()
	for i in range(1, N):
		g = gcd(arr[i], g)
	for i in range(1, g + 1):
		if i * i > g:
			break
		if g % i == 0:
			divisors[i] = 1
			if g // i != i:
				divisors[g // i] = 1
	print(len(divisors))
n = int(input())
arr = list(map(int, input().split()))
printAllDivisors(arr, n)


from math import gcd
from functools import reduce

def find_gcd(arr):
	ret = reduce(gcd, arr)
	return ret
n = int(input())
arr = list(map(int, input().split()))

def nu_of_factors1b(n):
	result_set = set()
	for i in range(1, 1 + int(n ** 0.5)):
		if n % i == 0:
			result_set.add(n // i)
			result_set.add(i)
	return len(result_set)
print(nu_of_factors1b(find_gcd(arr)))


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
A = list(map(int, input().split()))
allgcd = 0
for x in A:
	allgcd = gcd(allgcd, x)
ans = 1
i = 2
while i * i <= allgcd:
	cnt = 0
	while allgcd % i == 0:
		cnt += 1
		allgcd /= i
	ans *= cnt + 1
	i += 1
if allgcd > 1:
	ans *= 2
print(ans)


from __future__ import division, print_function
import os
import sys
from difflib import SequenceMatcher
from io import BytesIO, IOBase
from collections import Counter, deque
from heapq import heapify, heappush, heappop
from math import gcd, ceil, sqrt, log2, log
from itertools import accumulate, repeat, permutations, compress
import operator
from operator import itemgetter
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def rl():
	return list(map(int, input().split()))

def arp(arr):
	return ' '.join([str(i) for i in arr])

def divisors(n):
	val = 0
	i = 1
	while i * i < n:
		if n % i == 0:
			val += 1
		i += 1
	for i in range(int(sqrt(n)), 0, -1):
		if n % i == 0:
			val += 1
	return val
(n,) = rl()
arr = rl()
ans = arr[0]
for i in range(1, n):
	ans = gcd(arr[i], ans)
print(divisors(ans))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')


from math import sqrt

def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)

def gcd1(sp):
	a = sp[0]
	for i in range(len(sp) - 1):
		a = gcd(a, sp[i + 1])
	return a
n = int(input())
kol = 0
num = gcd1(list(map(int, input().split())))
for i in range(1, int(sqrt(num)) + 1):
	if num % i == 0 and i ** 2 == num:
		kol += 1
	elif num % i == 0 and i * i != num:
		kol += 2
print(kol)


import math
ll = lambda : list(map(int, input().split()))
testcases = 1
for testcase in range(testcases):
	[n] = ll()
	a = ll()
	g = a[0]
	for i in a[1:]:
		g = math.gcd(g, i)
	c = 0
	for i in range(1, int(math.sqrt(g)) + 1):
		if i * i == g:
			c += 1
		elif g % i == 0:
			c += 2
	print(c)


import math
n = int(input())
nub = list(map(int, input().split()))
temp = 0
for elem in nub:
	temp = math.gcd(temp, elem)
count = 0
i = 1
while i * i <= temp:
	if temp % i == 0:
		count += 1
		if i * i != temp:
			count += 1
	i += 1
print(count)


import math

def div(n):
	(i, ans) = (1, set())
	while i * i <= n:
		if n % i == 0:
			ans.add(i)
			ans.add(n // i)
		i += 1
	return len(ans)
n = int(input())
l = list(map(int, input().split()))
x = l[0]
for i in range(1, n):
	x = math.gcd(x, l[i])
print(div(x))


from math import sqrt, ceil

def commonDivisorsOf(array):
	lowestValue = min(array)
	for factor in factorsOf(lowestValue):
		if all((not value % factor for value in array)):
			return nFactorsOf(factor)

def factorsOf(n):
	if n == 1:
		yield 1
		return
	(factorsStorage, squareRoot_n) = ([], sqrt(n))
	limit = ceil(squareRoot_n)
	for value in range(1, limit):
		if not n % value:
			yield (n / value)
			factorsStorage.append(value)
	if squareRoot_n == limit:
		yield limit
	factorsStorage.reverse()
	for factor in factorsStorage:
		yield factor

def nFactorsOf(n):
	if n == 1:
		return 1
	squareRoot_n = sqrt(n)
	(nFactors, limit) = (2, ceil(squareRoot_n))
	for value in range(2, limit):
		if not n % value:
			nFactors += 2
	return nFactors + 1 if squareRoot_n == limit else nFactors
input()
print(commonDivisorsOf(tuple(map(int, input().split(' ')))))


def gcd(x, y):
	if y == 0:
		return x
	else:
		return gcd(y, x % y)
n = int(input())
a = list(map(int, input().split()))
s = gcd(a[n - 1], a[n - 2])
for i in range(n - 2):
	s = gcd(s, a[i])
p = 2
pp = 0
jf = []
while 1:
	if p > s ** 0.5 and s > 10 ** 7:
		if len(jf) == 0:
			s = 2
		else:
			s = 1
			jf.append(1)
		break
	if s == 1:
		if pp != 0:
			jf.append(pp)
		break
	if s % p == 0:
		s = s // p
		pp += 1
	else:
		p += 1
		if pp != 0:
			jf.append(pp)
			pp = 0
for x in jf:
	s = s * (x + 1)
print(s)


import math
n = int(input())
arr = [int(x) for x in input().split()]
gcd = arr[0]
for i in range(n - 1):
	gcd = math.gcd(gcd, arr[i + 1])
r = 0
for i in range(int((gcd - 0.5) ** (1 / 2))):
	if gcd % (i + 1) == 0:
		r += 2
if int(gcd ** (1 / 2)) ** 2 == gcd:
	r += 1
print(r)


def getGCD(a, b):
	if not b:
		return a
	if b > a:
		(a, b) = (b, a)
	while b > 0:
		(a, b) = (b, a % b)
	return a
n = int(input())
ar = sorted(list(set(list(map(int, input().split(' '))))))
l = ar.__len__()
gcd = None
for i in range(l):
	gcd = getGCD(ar[i], gcd)
res = 0
d = 1
while True:
	if d * d > gcd:
		break
	if gcd % d == 0:
		res += 1
		if d != gcd / d:
			res += 1
	d += 1
print(res)


import math
import sys
n = int(sys.stdin.readline())
strr = sys.stdin.readline()
arr = list(map(int, strr.split()))
gcd = arr[0]
for i in range(1, n):
	gcd = math.gcd(gcd, arr[i])
(count, i) = (0, 1)
while i * i <= gcd:
	if gcd % i == 0:
		count += 1
		if i != gcd // i:
			count += 1
	i += 1
print(count)


k = int(input())
p = [int(i) for i in input().split()]
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
if len(p) == 1:
	print(len(factors(p[0])))
elif len(p) == 2:
	gcd = find_gcd(p[0], p[1])
	print(len(factors(gcd)))
else:
	num1 = p[0]
	num2 = p[1]
	gcd = find_gcd(num1, num2)
	for i in range(2, len(p)):
		gcd = find_gcd(gcd, p[i])
	print(len(factors(gcd)))


from collections import deque
import sys, math

def inp():
	return sys.stdin.readline().strip()
n = int(inp())
a = list(map(int, inp().split()))
gcd = a[0]
for i in a:
	gcd = math.gcd(i, gcd)
i = 1
ct = 0
while i * i <= gcd:
	if gcd % i == 0:
		ct += 2
		if i == gcd // i:
			ct -= 1
	i += 1
print(ct)


from functools import reduce
I = lambda : int(input())
IL = lambda : list(map(int, input().split()))
IF = lambda : list(map(float, input().split()))

def gcd(x, y):
	if y == 0:
		return x
	return gcd(y, x % y)
n = I()
A = IL()
mA = reduce(gcd, A, 0)
ans = sum((2 for i in range(1, int(mA ** 0.5) + 1) if mA % i == 0))
ans -= int(mA ** 0.5) ** 2 == mA
print(ans)


from math import gcd
n = int(input())
l = list(map(int, input().split()))
l.sort()
cnt = 0
flag = 0
res = l[0]
for i in range(1, n):
	res = gcd(res, l[i])
if res == 1:
	print(1)
else:
	for i in range(1, int(pow(res, 0.5)) + 1):
		if res % i == 0:
			if i * i == res:
				cnt += 1
			else:
				cnt += 2
	print(cnt)


def HCF(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
l = list(map(int, input().split()))
if n >= 2:
	hc = HCF(l[0], l[1])
	for i in range(2, n):
		hc = HCF(hc, l[i])
else:
	hc = l[0]
co = 1
for i in range(2, int(hc ** 0.5) + 1):
	if hc % i == 0:
		co += 1
if co == 1:
	if hc == 1:
		print(co)
	else:
		print(2)
elif int(hc ** 0.5) == hc ** 0.5:
	print(2 * co - 1)
else:
	print(2 * co)


import math

def count(n):
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
a = list(map(int, input().split()))
l = 0
if len(a) > 1:
	a1 = a[0]
	a2 = a[1]
	g = gcd(a1, a2)
	for i in range(2, len(a)):
		g = gcd(g, a[i])
	print(count(g))
else:
	print(count(a[0]))


import math
n = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(n):
	ans = math.gcd(ans, a[i])
res = 0
for i in range(1, int(ans ** 0.5 + 1)):
	if ans % i == 0:
		res += 1
		if i != ans / i:
			res += 1
print(res)


import math

def countf(n):
	i = 1
	count = 0
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				count += 1
			else:
				count += 2
		i = i + 1
	return count
n = int(input())
l = list(map(int, input().split()))
gcd = l[0]
for i in l:
	gcd = math.gcd(gcd, i)
print(countf(gcd))


import math

def countDivisors(n):
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt

def gcd(m, n):
	if n == 0:
		return m
	return gcd(n, m % n)
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(n):
	g = gcd(a[i], g)
res = countDivisors(g)
print(res)


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

def solve(a):
	res = a[0]
	for i in range(1, len(a)):
		res = math.gcd(res, a[i])
	cnt = 0
	for k in range(1, int(res ** 0.5) + 1):
		if res % k == 0:
			cnt += 1
			if res / k != k:
				cnt += 1
	return cnt
print(solve(a))


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
n = int(input())
dat = list(map(int, input().split()))
div = dat[0]
import math
for i in range(n):
	div = math.gcd(div, dat[i])
d = make_divisors(div)
print(len(d))


import math
n = int(input().strip())
nums = [int(i) for i in input().strip().split()]
nums.sort()
result = nums[0]
for i in range(1, n):
	result = math.gcd(result, nums[i])
index = 1
ans = 0
while index * index <= result:
	if result % index == 0:
		ans += 1 if result // index == index else 2
	index += 1
print(ans)


import math

def no_of_divisors(x):
	if x == 1:
		return 1
	i = 1
	count = 0
	while i <= math.sqrt(x):
		if x % i == 0:
			if x / i == i:
				count += 1
			else:
				count += 2
		i = i + 1
	return count

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def solve(a, n):
	if n == 1:
		return no_of_divisors(a[0])
	a = sorted(a)
	common_gcd = gcd(a[0], a[1])
	for i in range(2, n):
		common_gcd = gcd(min(common_gcd, a[i]), max(common_gcd, a[i]))
	return no_of_divisors(common_gcd)
n = int(input())
a = list(map(int, input().split()))
print(solve(a, n))


from math import *
n = int(input())
a = list(map(int, input().split()))
x = 0
for i in a:
	x = gcd(x, i)
s = set()
for i in range(1, int(pow(x, 0.5)) + 1):
	if x % i == 0:
		s.add(i)
		s.add(x // i)
print(len(s))


from functools import reduce
from math import gcd
n = int(input())
array = [int(i) for i in input().split()]
hcf = reduce(gcd, array)
print(len(set(reduce(list.__add__, ([i, hcf // i] for i in range(1, int(hcf ** 0.5) + 1) if not hcf % i)))))


import math

def countDivisors(n):
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def GCD(A):
	p = A[0]
	for i in range(1, len(A)):
		p = gcd(p, A[i])
	return p
n = int(input())
A = [int(x) for x in input().split()]
l = GCD(A)
print(countDivisors(l))


import math
n = int(input())
a = [int(x) for x in input().split()]
g = 0
for i in range(n):
	g = math.gcd(g, a[i])
ans = set()
for i in range(1, int(math.sqrt(g)) + 1):
	if g % i == 0:
		ans.add(i)
		ans.add(g // i)
print(len(ans))


from math import gcd, sqrt

def findDivisors(n):
	l = []
	for i in range(1, int(sqrt(n) + 1)):
		if n % i == 0:
			if n == i * i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l
n = int(input())
A = list(map(int, input().split()))
g = A[0]
for i in A[1:]:
	g = gcd(i, g)
print(len(findDivisors(g)))


import sys
import math

def input_from_file(file_name):
	sys.stdin = open(file_name, 'r')

def filter_data(data, type):
	if type == 'list':
		return data
	else:
		return data[0]
take_input = lambda data_type: [data_type(x) for x in input().split(' ')]
cin = lambda data_type, type: filter_data(take_input(data_type), type)

def main():
	n = cin(int, 'single')
	arr = cin(int, 'list')
	_gcd = 0
	for x in arr:
		_gcd = math.gcd(_gcd, x)
	total = set()
	for i in range(1, int(math.sqrt(_gcd) + 1)):
		if _gcd % i == 0:
			total.add(i)
			total.add(_gcd / i)
	print(len(total))
main()


import math

def countDivisor(n):
	count = 0
	i = 1
	while i * i <= n:
		if n % i == 0:
			if n // i == i:
				count += 1
			else:
				count += 2
		i = i + 1
	return count
n = int(input())
array = list(map(int, input().split()))
g = 0
for i in range(n):
	g = math.gcd(g, array[i])
print(countDivisor(g))


import math

def HCF(x, y):
	if x == 0:
		return y
	else:
		if y == 0:
			return x
		mod = x % y
		return HCF(y, mod)

def factors(num):
	i = 1
	count = 0
	while i <= int(math.sqrt(num)):
		if num % i == 0:
			if num / i == i:
				count += 1
			else:
				count += 2
		i += 1
	print(count)
N = int(input())
arr = list(map(int, input().split()))
arr.sort()
gcd = 1
if N >= 2:
	gcd = HCF(arr[0], arr[1])
	if N == 2:
		factors(gcd)
	else:
		for i in range(2, N):
			gcd = HCF(gcd, arr[i])
		factors(gcd)
else:
	factors(arr[0])


from math import gcd
from math import sqrt
from functools import reduce

def find_gcd(list):
	x = reduce(gcd, list)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
n = int(input())
l = list(map(int, input().split()))
x = find_gcd(l)
if x == 1:
	print(1)
elif isPrime(x) == True:
	print(2)
else:
	square = int(sqrt(x))
	c = 0
	for i in range(1, square + 1):
		if x % i == 0:
			c += 1
	if square ** 2 == x:
		print(c * 2 - 1)
	else:
		print(c * 2)


def gcd(a, b):
	if b < a:
		(a, b) = (b, a)
	if b % a == 0:
		return a
	return gcd(a, b % a)

def find(A):
	if len(A) == 1:
		return A[0]
	cur = A[0]
	for i in range(1, len(A)):
		cur = gcd(cur, A[i])
	return cur

def factors(X):
	if X == 1:
		return 1
	count = 0
	for i in range(1, int(X ** 0.5) + 1):
		if X % i == 0:
			count += 2
	if int(X ** 0.5) ** 2 == X:
		count -= 1
	return count
input()
print(factors(find(list(map(int, input().strip().split(' '))))))


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import math
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

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

def read():
	sys.stdin = open('venv\\CodeForces\\input.txt', 'r')
	sys.stdout = open('venv\\CodeForces\\output.txt', 'w')

def main():
	n = int(input())
	arr = list(set(map(int, input().split())))
	ans = 1
	if len(arr) >= 2:
		gg = math.gcd(arr.pop(0), arr.pop(0))
		for i in range(0, len(arr)):
			gg = math.gcd(gg, arr[i])
		ans = 0
		i = 1
		while i * i <= gg:
			if gg % i == 0:
				ans += 1
				if i != gg // i:
					ans += 1
			i += 1
		print(ans)
	else:
		ans = 0
		i = 1
		gg = arr[0]
		while i * i <= gg:
			if gg % i == 0:
				ans += 1
				if i != gg // i:
					ans += 1
			i += 1
		print(ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math
from math import gcd
n = int(input())
l = [int(j) for j in input().split()]
g = l[0]
for i in range(1, n):
	g = gcd(l[i], g)
k = 1
for i in range(2, 2 + int(math.sqrt(g))):
	c = 0
	while g % i == 0:
		g = g // i
		c += 1
	k = k * (c + 1)
if g > 2:
	k *= 2
print(k)


from bisect import *
from math import *
from collections import Counter, defaultdict
from sys import stdin, stdout
input = stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))

def solve():
	n = I()
	a = LI()
	g = 0
	for i in range(n):
		g = gcd(g, a[i])
	ans = 0
	i = 1
	while i * i <= g:
		if g % i == 0:
			ans += 1
			if i != g // i:
				ans += 1
		i += 1
	print(ans)
for _ in range(1):
	solve()


import math
n = int(input())
ans = 0
a = list(map(int, input().split()))
if n == 1:
	x = a[0]
else:
	x = math.gcd(a[1], a[0])
	for i in range(n):
		x = math.gcd(x, a[i])
for i in range(1, int(math.sqrt(x)) + 1):
	if x % i == 0:
		if x / i == i:
			ans += 1
		else:
			ans += 2
print(ans)


import math

def get_cnt(kek):
	ans = 0
	if kek == 1:
		return 1
	i = 1
	while i * i < kek:
		if kek % i == 0:
			ans += 2
		i += 1
	if i * i == kek:
		ans += 1
	return ans
n = int(input())
l = list(map(int, input().split()))
N = l[0]
for i in range(n):
	N = math.gcd(N, l[i])
print(get_cnt(N))


import sys
from math import gcd

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7

def divisors(N: int) -> set:
	from math import sqrt
	s = {1, N}
	for i in range(2, int(sqrt(N)) + 1):
		if N % i == 0:
			s.add(i)
			s.add(N // i)
	return s
N = INT()
A = LIST()
g = 0
for a in A:
	g = gcd(g, a)
divs = divisors(g)
ans = len(divs)
print(ans)


import math

def gcd(a, b):
	while b > 0:
		(a, b) = (b, a % b)
	return a

def gcd_a(a):
	result = a[0]
	for i in a[1:]:
		result = gcd(result, i)
	return result

def printDivisors(n):
	i = 1
	c = 0
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				c += 1
			else:
				c += 2
		i = i + 1
	return c
n = int(input())
a = list(map(int, input().split()))
p = gcd_a(a)
print(printDivisors(p))


import math
n = int(input())
arr = list(map(int, input().split()))
gcd = arr[0]
for i in arr[1:]:
	gcd = math.gcd(gcd, i)
cnt = 0
for i in range(1, int(gcd ** 0.5) + 1):
	if gcd % i == 0:
		if i * i == gcd:
			cnt += 1
		else:
			cnt += 2
print(cnt)


import sys
input = sys.stdin.readline
from math import gcd, sqrt
n = int(input())
l = list(map(int, input().split()))
g = l[0]
for x in l:
	g = gcd(g, x)
ans = 0
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		if i * i == g:
			ans += 1
		else:
			ans += 2
print(ans)


import math

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def calcDivisors(n):
	ans = 0
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				ans = ans + 1
			else:
				ans = ans + 2
		i = i + 1
	return ans
n = int(input())
l = [int(i) for i in input().split()]
if n != 1:
	gcd = find_gcd(l[0], l[1])
if n == 1:
	gcd = l[0]
for i in range(2, n):
	gcd = find_gcd(gcd, l[i])
print(calcDivisors(gcd))


from math import gcd
from functools import reduce
lens = int(input())
gc_d = reduce(gcd, [int(x) for x in input().split()])
i = 1
cnts = 0
while i * i <= gc_d:
	if gc_d % i == 0:
		cnts += 1
		cnts += i * i != gc_d
	i += 1
print(cnts)


from math import sqrt

def gcd(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a
n = int(input())
s = list(map(int, input().split()))
d = s[0]
for i in range(1, n):
	d = gcd(d, s[i])
powers = []
count = 0
for i in range(2, round(sqrt(d)) + 1):
	if d % i == 0:
		powers.append(0)
		while d % i == 0:
			powers[count] += 1
			d //= i
		count += 1
ans = 1
for i in range(len(powers)):
	ans *= powers[i] + 1
if d != 1:
	ans *= 2
print(ans)


from math import gcd
n = int(input())
arr = list(map(int, input().split(' ')))
g = arr[0]
for i in arr[1:]:
	g = gcd(g, i)
c = 0
for i in range(1, g + 1):
	if i * i > g:
		break
	if g % i == 0:
		c += 2
		if i * i == g:
			c -= 1
print(c)


from sys import stdin, stdout
import math

def sieve(n):
	arr = [True for i in range(n + 1)]
	for i in range(2, n + 1):
		if arr[i] == True:
			for j in range(i ** 2, n + 1, i):
				arr[j] = False
	arr1 = []
	for i in range(2, len(arr)):
		if arr[i] == True:
			arr1.append(i)
	return arr1

def factor(n):
	arr = sieve(int(n ** 0.5))
	d = {}
	for i in arr:
		if n % i == 0:
			ctr = 0
			while n % i == 0:
				n = n // i
				ctr += 1
			d[i] = ctr
	if n != 1:
		d[n] = 1
	return d
n = int(stdin.readline())
arr = list(map(int, stdin.readline().strip().split(' ')))
gcd = arr[0]
for i in range(1, len(arr)):
	gcd = math.gcd(gcd, arr[i])
t1 = factor(gcd)
ans = 1
for i in t1:
	ans = ans * (t1[i] + 1)
stdout.write(str(int(ans)) + '\n')


from itertools import accumulate
import os
import sys
from io import BytesIO, IOBase
import math
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def factor(n):
	s = set()
	s.add(1)
	s.add(n)
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			s.add(i)
			s.add(n // i)
	return s
n = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, len(a)):
	ans = math.gcd(a[i], ans)
print(len(factor(ans)))


from math import gcd
from functools import reduce
_ = input()
arr = list(map(lambda num: int(num), input().split()))
if len(arr) != 1:
	mygcd = gcd(arr[0], arr[1])
	for num in arr[2:]:
		mygcd = gcd(mygcd, num)
else:
	mygcd = arr[0]
n = mygcd
print(len(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))))


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
a = list(map(int, input().split()))
x = a[0]
for i in range(1, n):
	x = gcd(x, a[i])
d = []
flag = False
i = 1
while i * i <= x:
	if x % i == 0:
		d.append(i)
		if i * i == x:
			flag = True
			d.append(x // i)
	i += 1
s = set(d)
if flag:
	print(len(s) * 2 - 1)
else:
	print(len(s) * 2)


from math import gcd, sqrt
n = int(input())
a = list(map(int, input().split()))
if n == 1:
	d = a[0]
else:
	d = gcd(a[0], a[1])
	for i in range(2, n):
		if d == 1:
			break
		if not a[i] % d == 0:
			d = gcd(d, a[i] - d)
ans = 0
for i in range(1, int(sqrt(d)) + 1):
	if d % i == 0:
		if d / i == i:
			ans += 1
		else:
			ans += 2
print(ans)


from math import sqrt

def fact(n):
	ans = set()
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			ans.add(i)
			ans.add(n // i)
	return ans

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
n = int(input())
a = [int(i) for i in input().split()]
if n == 1:
	ans = fact(a[0])
else:
	g = gcd(a[0], a[1])
	for i in range(2, n):
		g = gcd(g, a[i])
	ans = fact(g)
print(len(ans))


import math

def findIt(num):
	_X51 = 0
	for _ in range(1, int(math.sqrt(num)) + 1):
		if num % _ == 0:
			if num // _ != _:
				_X51 += 2
			else:
				_X51 += 1
	print(1 if num == 1 else _X51)
n = int(input())
a = list(map(int, input().split()))
_YNEOS = a[0]
for i in range(1, n):
	_YNEOS = math.gcd(_YNEOS, a[i])
findIt(_YNEOS)


import math
for _ in range(1):
	n = int(input())
	a = list(map(int, input().split()))
	k = a[0]
	for i in range(1, len(a)):
		k = math.gcd(k, a[i])
	if k == 1:
		print(1)
	else:
		s = 0
		i = 1
		while i <= math.sqrt(k):
			if k % i == 0:
				if k / i == i:
					s += 1
				else:
					s += 2
			i = i + 1
		print(s)


n = int(input())
from math import gcd
arr = list(map(int, input().split()))

def get_factors(n):
	sqrt = int(n ** 0.5)
	ans = 0
	for i in range(1, sqrt + 1):
		if n % i == 0:
			if i * i == n:
				ans += 1
			else:
				ans += 2
	return ans
ans = arr[0]
for i in arr:
	ans = gcd(ans, i)
ans = get_factors(ans)
print(ans)


from math import gcd
n = int(input())
a = [int(i) for i in input().split()]
d = a[0]
for i in a:
	d = gcd(d, i)
ans = 0
for i in range(1, int(d ** 0.5) + 1):
	if d % i == 0:
		if d // i != i:
			ans += 2
		else:
			ans += 1
print(ans)


import math

def countDivisors(n):
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt
n = int(input())
a = list(map(int, input().split()))
k = 0
for i in range(len(a)):
	k = math.gcd(k, a[i])
print(countDivisors(k))


def gcd(a, b):
	while a * b != 0:
		if a > b:
			a %= b
		else:
			b %= a
	return a + b
n = int(input())
a = list(map(int, input().split()))
x = a[0]
for i in range(1, n):
	x = gcd(x, a[i])
ans = 1
cnt = 0
d = 2
while d ** 2 <= x:
	if x % d == 0:
		cnt += 1
		x //= d
	else:
		ans *= cnt + 1
		cnt = 0
		d += 1
if x != 1 and x % d == 0:
	cnt += 1
	ans *= cnt + 1
	x //= d
else:
	ans *= cnt + 1
if x != 1:
	ans *= 2
print(ans)


T = int(input())
a = list(map(int, input().split()))
a.sort()
s = a.pop(0)
if s == 1:
	print(1)
	exit()
a2 = list(set(map(lambda x: x % s, a)))

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
d = make_divisors(s)
e = []
for i in d:
	ans = True
	for j in a2:
		if j % i != 0:
			ans = False
			break
	if not ans:
		e.append(i)
print(len(d) - len(e))


def evc(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
srch = 0
n = int(input())
a = list(map(int, input().split()))
for i in a:
	srch = evc(i, srch)
ans = 0
i = 1
while i * i < srch:
	if srch % i == 0:
		ans += 2
	i += 1
if srch == i * i:
	ans += 1
print(ans)


def euclide(a, b):
	if a > b:
		while b:
			(a, b) = (b, a % b)
		return a
	else:
		while a:
			(b, a) = (a, b % a)
		return b
n = int(input())
arr = list(map(int, input().split()))
nod = 0
for elem in arr:
	nod = euclide(elem, nod)
ans = 0
i = 1
while i * i <= nod:
	if nod % i == 0:
		ans += 1
		if i != nod / i:
			ans += 1
	i += 1
print(ans)


import sys
from collections import Counter

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
g = 0
input()
for i in map(int, next(sys.stdin).split(' ')):
	g = gcd(g, i)
result = set()
for i in range(1, g + 1):
	if i ** 2 > g:
		break
	if g % i == 0:
		result.add(i)
		result.add(g // i)
print(len(result))


import sys, math, queue
MOD = 998244353
sys.setrecursionlimit(1000000)
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for ai in a:
	g = math.gcd(g, ai)
(a, i) = (0, 1)
while i * i < g:
	if g % i == 0:
		a += 2
	i += 1
if i * i == g:
	a += 1
print(a)


from sys import stdin, stdout
INF = 100000000000.0

def get_int():
	return int(stdin.readline().strip())

def get_ints():
	return map(int, stdin.readline().strip().split())

def get_array():
	return list(map(int, stdin.readline().strip().split()))

def get_string():
	return stdin.readline().strip()

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = get_int()
a = get_array()
if n == 1:
	res = a[0]
else:
	res = gcd(a[0], a[1])
	for i in range(2, n):
		res = gcd(res, a[i])
i = 1
ans = 0
while i * i <= res:
	if res % i == 0:
		ans += 1
		if i != res // i:
			ans += 1
	i += 1
print(ans)


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
n = int(input())
lis = list(map(int, input().split()))
m = div = 0
for i in lis:
	m = gcd(m, i)
for i in range(1, int(m ** 0.5) + 1):
	if m % i == 0 and i ** 2 != m:
		div += 2
	elif m % i == 0:
		div += 1
print(div)


import math

def gcd(a, b):
	while b != 0:
		c = a % b
		a = b
		b = c
	return a
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
	g = gcd(a[i], g)
u = int(math.sqrt(g))
ans = 0
for i in range(1, u + 1):
	if g % i == 0:
		ans += 1
		if g // i != i:
			ans += 1
print(ans)


import sys
_ = input()
A = list(map(int, sys.stdin.readline().split()))
import math

def gcd(x, y):
	while y != 0:
		(x, y) = (y, x % y)
	return x

def f(A):
	min_element = min(A)
	dictionary = dict()
	A = list(filter(lambda x: x % min_element != 0, A))
	for i in A:
		if gcd(min_element, i) < min_element:
			min_element = gcd(min_element, i)
		if min_element == 1:
			print(1)
			return
	if min_element == 1:
		print(1)
		return
	number_of_2 = 0
	while min_element % 2 == 0:
		number_of_2 += 1
		min_element /= 2
	all_divs = number_of_2 + 1
	for i in range(3, int(math.sqrt(min_element)) + 4, 2):
		cnt = 1
		if min_element < i:
			break
		while min_element % i == 0:
			min_element /= i
			cnt += 1
		all_divs *= cnt
	if min_element > 2:
		all_divs *= 2
	print(all_divs)
f(A)


from math import *
from functools import *

def fact(n):
	s = set()
	x = 1
	while x * x <= n:
		if n % x == 0:
			s.add(n // x)
			s.add(x)
		x += 1
	return s
n = int(input())
l = list(map(int, input().split()))
x = reduce(gcd, l)
print(len(fact(x)))


from os import path
import sys, time
from math import ceil, floor, gcd, log, log2, factorial
from collections import defaultdict, Counter, deque
from itertools import permutations
maxx = float('inf')
I = lambda : int(sys.stdin.buffer.readline())
tup = lambda : map(int, sys.stdin.buffer.readline().split())
lint = lambda : [int(x) for x in sys.stdin.buffer.readline().split()]
S = lambda : sys.stdin.readline().replace('\n', '').strip()

def grid(r, c):
	return [lint() for i in range(r)]
stpr = lambda x: sys.stdout.write(f'{x}' + '\n')
star = lambda x: print(' '.join(map(str, x)))
localsys = 0
start_time = time.time()
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def divs(n):
	a = set()
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			a.add(i)
			a.add(n // i)
	return len(a)
n = I()
ls = lint()
gc = 0
for i in ls:
	gc = gcd(gc, i)
print(divs(gc))
if localsys:
	print('\n\nTime Elased :', time.time() - start_time, 'seconds')


from sys import stdin
import math
testcases = False
from collections import Counter

def gcd(x, y):
	if x == 0:
		return y
	if y == 0:
		return x
	x = x % y
	return gcd(y, x)
if testcases:
	t = int(stdin.readline())
	while t:
		n = int(stdin.readline())
		a = list(map(int, stdin.readline().split()))
		t -= 1
else:
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	g = a[0]
	for e in a[1:]:
		g = gcd(g, e)
	ans = 1 if g == 1 else 2
	for i in range(2, int(math.sqrt(g)) + 1):
		if g % i == 0:
			ans += 1
			if i * i != g:
				ans += 1
	print(ans)


def gns():
	return list(map(int, input().split()))
from math import gcd
from functools import reduce

def factors(n):
	return len(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))
t = 1

def get(n):
	ans = 0
	for i in range(1, n + 1):
		if i * i > n:
			break
		if n % i == 0:
			ans.add(i)
			ans.add(n // i)
	return ans
for i in range(t):
	n = int(input())
	ns = gns()
	last = ns[0]
	g = ns[0]
	for c in ns:
		g = gcd(g, c)
	print(factors(g))


from sys import stdin
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
n = I()
ans = p = 0
for i in R():
	p = gcd(p, i)
if p == 1:
	print(1)
else:
	for i in range(1, round(sqrt(p)) + 1):
		if p % i == 0:
			ans += 2
	if int(sqrt(p)) ** 2 == p:
		ans -= 1
	print(ans)


from math import gcd
n = int(input())
y = list(map(int, input().split()))
x = y[0]
for i in y[1:]:
	x = gcd(x, i)
ans = 0
for i in range(1, int(x ** 0.5) + 1):
	if x % i == 0:
		if x // i == i:
			ans += 1
		else:
			ans += 2
print(ans)


n = int(input())
array = list(set(set(map(int, input().split()))))
n = len(array)

def nod(a, b):
	while a != 0 and b != 0:
		if a > b:
			a %= b
		else:
			b %= a
	return max(a, b)
nod_max = array[0]
for i in range(1, n):
	nod_max = nod(nod_max, array[i])
dels = {1, nod_max}
i = 2
while i * i <= nod_max:
	if nod_max % i == 0:
		dels.add(i)
		dels.add(nod_max // i)
	i += 1
print(len(dels))


import math
n = int(input())
array = list(map(int, input().split()))
res = array[0]
for i in range(1, len(array)):
	res = math.gcd(array[i], res)
	if res == 1:
		break
ans = 0
i = 1
while i ** 2 <= res:
	if res % i == 0:
		ans += 1
		if i != res / i:
			ans += 1
	i += 1
print(ans)


a = int(input())
t = list(map(int, input().split()))
u = t[0]
import math
for j in range(a):
	u = math.gcd(u, t[j])
s = 0
for k in range(1, int(u ** 0.5 + 1)):
	if u % k == 0:
		if u // k == k:
			s += 1
		else:
			s += 2
print(s)


def get_dividers(n):
	i = 1
	ans = set()
	while i <= n ** (1 / 2):
		if n % i == 0:
			ans.add(i)
			ans.add(n // i)
		i += 1
	return ans

def sub_gcd(a, b):
	while b > 0:
		(a, b) = (b, a % b)
	return a

def gcd(array):
	result = array[0]
	for i in array[1:]:
		result = sub_gcd(result, i)
	return result

def main():
	n = input()
	numbers = list(map(int, input().split()))
	gcd_ = gcd(numbers)
	ans = get_dividers(gcd_)
	print(len(ans))
main()


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def getfactrlist(a):
	if a == 1:
		return 1
	F = 2
	for i in range(2, int(a ** 0.5) + 1):
		if a % i == 0:
			if a // i == i:
				F += 1
			else:
				F += 2
	return F
n = int(input())
A = list(map(int, input().split()))
a = A[0]
for i in A[1:]:
	a = gcd(a, i)
g = getfactrlist(a)
print(g)


def main():
	import sys
	input = sys.stdin.buffer.readline
	N = int(input())
	A = [int(i) for i in input().split()]

	def gcd(x, y):
		if y == 0:
			return x
		while y != 0:
			(x, y) = (y, x % y)
		return x
	g = A[0]
	for a in A[1:]:
		g = gcd(g, a)

	def trial_division(n):
		divs = []
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				divs.append(i)
				if i != n // i:
					divs.append(n // i)
		return divs
	print(len(trial_division(g)))
main()


def nod(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a

def f(x):
	result = []
	while x != 1:
		d = 2
		while d * d <= x:
			if x % d == 0:
				result.append(0)
				while x % d == 0:
					result[-1] += 1
					x //= d
				break
			d += 1
		else:
			result.append(1)
			x = 1
	return result
n = int(input())
A = list(map(int, input().split()))
res = A[0]
for i in range(1, n):
	res = nod(res, A[i])
final = f(res)
ans = 1
for i in range(len(final)):
	ans *= final[i] + 1
print(ans)


import math
num = int(input())
input_1 = input()
input_2 = input_1.split(' ')
input_array = []
for i in range(0, num):
	input_array.append(int(input_2[i]))
gcd = input_array[0]
for i in range(1, num):
	gcd = math.gcd(gcd, input_array[i])
from math import sqrt

def factors(n):
	return set((x for tup in ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0) for x in tup))
factors_list = factors(gcd)
print(len(factors_list))


import math

def gcd(a, b):
	if a < b:
		(a, b) = (b, a)
	while b != 0:
		(a, b) = (b, a % b)
	return a
primecount = 1

def factorize(a):
	global primecount
	primecount = 1

	def _factorize(a):
		global primecount
		till = int(math.sqrt(a)) + 1
		for i in range(2, till + 1):
			cnt = 1
			while a % i == 0:
				a = a // i
				cnt += 1
			primecount *= cnt
			if cnt > 1:
				return a
		primecount *= 2
		return 1
	while a > 1:
		a = _factorize(a)
	return primecount
n = int(input())
arr = list(map(int, input().split()))
assert n == len(arr)
g = arr[0]
for i in range(1, n):
	g = gcd(g, arr[i])
print(factorize(g))


import math
n = int(input())
a = list(map(int, input().split()))
g = 0
ans = 0
for i in range(n):
	g = math.gcd(g, a[i])
for i in range(1, g + 1):
	if i * i > g:
		break
	if g % i == 0:
		if i * i == g:
			ans = ans + 1
		else:
			ans = ans + 2
print(ans)


from math import gcd

def main():
	n = int(input())
	a = list(map(int, input().split()))
	g = 0
	for k in a:
		g = gcd(g, k)
	divs = {1, g}
	for i in range(2, int(g ** 0.5) + 5):
		if g % i == 0:
			divs.add(i)
			divs.add(g // i)
	print(len(divs))
main()


from math import *
n = int(input())
l = list(map(int, input().split()))
l = list(set(l))
g = l[0]
if len(l) > 1:
	g = gcd(l[0], l[1])
	for i in range(2, len(l)):
		g = gcd(g, l[i])
count = 0
for i in range(int(sqrt(g)), 0, -1):
	if g % i == 0:
		count += 1
count *= 2
if sqrt(g) == int(sqrt(g)):
	count -= 1
print(count)


import sys
import math
import itertools
import collections

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

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

def wr(arr):
	return ' '.join(map(str, arr))

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
n = ii()
a = li()
ans = min(a)
for c in a:
	ans = math.gcd(ans, c)
print(len(divs(ans)))


def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def countDivisors(n):
	cnt = 0
	for i in range(1, 100000000000):
		if i * i > n:
			break
		if n % i == 0:
			if n == i * i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt
n = int(input())
a = list(map(int, input().split()))
if n == 1:
	print(countDivisors(a[0]))
else:
	g = gcd(a[0], a[1])
	for i in range(2, n):
		g = gcd(g, a[i])
	print(countDivisors(g))


import math

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def list_gcd(list):
	curr_gcd = gcd(list[0], list[1])
	for i in range(1, len(list)):
		curr_gcd = gcd(curr_gcd, list[i])
	return curr_gcd
num = int(input())
num_list = [int(i) for i in input().split()]
if len(num_list) == 1:
	res = num_list[0]
else:
	res = list_gcd(num_list)
cnt = 0
for i in range(1, math.ceil(math.sqrt(res + 1))):
	if res % i == 0:
		if res // i == i:
			cnt += 1
		else:
			cnt += 2
print(cnt)


import math

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
arr = list(map(int, input().split()))
gcd = 0
for i in arr:
	gcd = find_gcd(gcd, i)
cd = 0
i = 1
while i <= math.sqrt(gcd):
	if gcd % i == 0:
		if i == gcd / i:
			cd += 1
		else:
			cd += 2
	i = i + 1
print(cd)


import math
n = int(input())
l = list(map(int, input().split()))

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def div(n):
	i = 1
	c = 0
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				c += 1
			else:
				c += 2
		i += 1
	return c
if n == 1:
	g = l[0]
else:
	x = l[0]
	y = l[1]
	g = gcd(x, y)
	for i in range(2, n):
		g = gcd(g, l[i])
print(div(g))


import math
import functools
num_elt = int(input())
num_list = list(map(int, input().split(' ')))
common = functools.reduce(math.gcd, num_list)
factors = 0
factor_set = set()
for i in range(1, int(common ** 0.5 + 1)):
	if common % i == 0:
		if i not in factor_set:
			factors += 1
			factor_set.add(i)
		if common / i not in factor_set:
			factors += 1
			factor_set.add(i)
print(factors)


import math
z = []

def printDivisors(n):
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				(z.append(i),)
			else:
				z.append(i)
				z.append(n / i)
		i = i + 1
	return z
n = int(input())
l = list(map(int, input().split()))
if n != 1:
	a = math.gcd(l[0], l[1])
	for i in range(2, n):
		a = math.gcd(a, l[i])
	print(len(printDivisors(a)))
else:
	print(len(printDivisors(l[0])))


from fractions import gcd

def nof(x):
	ans = 0
	for i in range(1, int(pow(x, 0.5)) + 1):
		if x % i == 0:
			if i != x // i:
				ans += 2
			else:
				ans += 1
	return ans
n = int(input())
a = list(map(int, input().strip().split()))
div = a[0]
for i in range(0, n):
	div = gcd(div, a[i])
print(nof(div))


import math
n = int(input())
arr = list(map(int, input().split()))
gc = 0
for i in arr:
	gc = math.gcd(gc, i)
s = []
for i in range(1, int(math.sqrt(gc * 1.0) + 1)):
	if gc % i == 0:
		s.append(int(i))
		if i != gc / i:
			s.append(int(gc / i))
print(len(s))


from functools import reduce
from math import gcd
db = int(input())
a = [int(x) for x in input().split()]
v = reduce(gcd, a)
ans = 0
for i in range(1, int(v ** 0.5) + 1):
	if v % i == 0:
		if v // i == i:
			ans += 1
		else:
			ans += 2
print(ans)


from math import gcd

def factor(n):
	table = []
	i = 2
	while i * i <= n:
		if n % i == 0:
			cnt = 0
			while n % i == 0:
				n //= i
				cnt += 1
			table.append((i, cnt))
		i += 1
	if n > 1:
		table.append((n, 1))
	return table
n = int(input())
A = [int(i) for i in input().split()]
g = 0
for a in A:
	g = gcd(g, a)
ans = 1
for (_, v) in factor(g):
	ans *= v + 1
print(ans)


from math import gcd, sqrt
a = int(input())
b = list(map(int, input().split()))
g = b[0]
ans = 0
for i in b:
	g = gcd(g, i)
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		ans += 1
		if i != g // i:
			ans += 1
print(ans)


from math import gcd, sqrt
n = int(input())
a = sorted(map(int, input().split()))
(z, w) = (a[0], 0)
for i in range(1, len(a)):
	z = gcd(z, a[i])
if z == 1:
	print(1)
else:
	for j in range(1, int(sqrt(z)) + 1):
		if z % j == 0:
			w += 1
	if z % sqrt(z) == 0:
		print(w * 2 - 1)
	else:
		print(w * 2)


n = int(input())

def gcd(x, y):
	if y:
		return gcd(y, x % y)
	return x
g = 0
for x in map(int, input().split()):
	g = gcd(g, x)
t = 1
d = 2
while d * d <= g:
	if 0 == g % d:
		p = 1
		while 0 == g % d:
			p += 1
			g /= d
		t *= p
	d += 1
if g > 1:
	t *= 2
print(t)


from math import sqrt
n = int(input())
tmp = input().split()
gcd = int(tmp[0])
for j in range(1, n):
	b = int(tmp[j])
	while b != 0:
		remain = gcd % b
		gcd = b
		b = remain
	if gcd == 1:
		break
sq = sqrt(gcd)
to = int(sq)
isSkipped = [False] * to
count = 0
for j in range(1, to + 1):
	if gcd % j == 0:
		if j == sq:
			count += 1
		else:
			count += 2
print(count)


from __future__ import division, print_function
from io import BytesIO, IOBase
import os, sys, math, heapq, copy
from collections import defaultdict, deque
from bisect import bisect_left, bisect_right
from functools import cmp_to_key
from itertools import permutations, combinations, combinations_with_replacement
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
mod = 1000000007

def get_int():
	return int(sys.stdin.readline().strip())

def get_str():
	return sys.stdin.readline().strip()

def get_float():
	return float(sys.stdin.readline().strip())

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_strs():
	return map(str, sys.stdin.readline().strip().split())

def get_floats():
	return map(float, sys.stdin.readline().strip().split())

def list_ints():
	return list(map(int, sys.stdin.readline().strip().split()))

def list_strs():
	return list(map(str, sys.stdin.readline().strip().split()))

def list_floats():
	return list(map(float, sys.stdin.readline().strip().split()))
n = get_int()
l = list_ints()
g = 0
for i in l:
	g = math.gcd(g, i)
cnt = 0
for i in range(1, math.floor(math.sqrt(g)) + 1):
	if g % i == 0:
		if g // i == i:
			cnt += 1
		else:
			cnt += 2
print(cnt)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
a = list(map(int, input().split()))
if n == 1:
	t = 0
	for i in range(1, int(a[0] ** 0.5) + 1):
		if i * (a[0] // i) == a[0]:
			if i != a[0] // i:
				t += 2
			else:
				t += 1
	print(t)
else:
	k = gcd(a[0], a[1])
	for i in range(2, n):
		k = gcd(k, a[i])
	t = 0
	for i in range(1, int(k ** 0.5) + 1):
		if i * (k // i) == k:
			if i != k // i:
				t += 2
			else:
				t += 1
	print(t)


def gcd(a, b):
	if a == 0:
		return b
	else:
		return gcd(b % a, a)
n = int(input())
a = list(map(int, input().split()))
g = 0
for x in a:
	g = gcd(g, x)
ans = 0
t = 1
while t * t <= g:
	if g % t == 0:
		ans += 1
		if t * t != g:
			ans += 1
	t += 1
print(ans)


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

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
liczba = l[0]
for i in range(1, n):
	liczba = gcd(liczba, l[i])
i = 2
count = 1
wyn = 1
l = liczba
while True:
	if i ** 2 > l:
		count = 2
		break
	if liczba % i == 0:
		liczba /= i
		count += 1
	else:
		wyn *= count
		count = 1
		i += 1
	if liczba == 1:
		break
wyn *= count
if l == 1:
	print(1)
else:
	print(wyn)


import math

def factor_count(n):
	result = 0
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if i == n / i:
				result += 1
			else:
				result = result + 2
	return result + 2
n = int(input())
a = list(map(int, input().split()))
x = a[0]
for i in a:
	x = math.gcd(i, x)
if x == 1:
	print(1)
else:
	print(factor_count(x))


def gcd(a, b):
	(a, b) = (max(a, b), min(a, b))
	while b != 0:
		(a, b) = (b, a % b)
	return a
n = int(input())
g = 0
a = list(map(int, input().split()))
for i in range(len(a)):
	g = gcd(g, a[i])
item = 2
mx = 1000000
c = 0
d = dict()
f = 1
while g != 1:
	if g % item == 0:
		d[item] = d.get(item, 0) + 1
		g //= item
	else:
		item += 1
	if item > mx:
		answ = 2 + len(d) + c
		f = 0
		break
if f == 1:
	item = 1
	for i in d.values():
		item *= i + 1
	print(item)
else:
	item = 1
	for i in d.values():
		item *= i + 1
	print(item * 2)


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def getlist():
	return list(map(int, input().split()))

def getvalue():
	return int(input())

def getstring():
	return input()
from functools import reduce

def factors(n):
	return len(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))
n = getvalue()
arr = getlist()
gc = arr[0]
for i in range(1, n):
	gc = math.gcd(gc, arr[i])
print(factors(gc) if gc > 1 else 1)


n = int(input())
a = list(map(int, input().split()))
m = min(a)
b = list()
l = 0
k = 0
r = 1
c = list()
for i in range(1, int(m ** 0.5) + 1):
	if m % i == 0:
		b.append(m // i)
		c.append(i)
		l = l + 1
for i in range(l):
	b.append(c[l - i - 1])
for i in range(2 * l):
	e = b[i]
	f = 0
	if e != 1:
		for j in range(n):
			if a[j] % e != 0:
				f = 1
				break
		if f == 0:
			r = e
			break
	else:
		break
v = set()
for i in range(1, int(r ** 0.5) + 1):
	if r % i == 0:
		v.add(i)
		v.add(r // i)
print(len(v))


from math import gcd, sqrt, ceil

def divisors(n):
	count = 2
	if n == 1:
		return 1
	for i in range(2, int(sqrt(n)) + 1):
		if n % i == 0:
			count += 2
	if n == int(sqrt(n)) ** 2:
		count -= 1
	return count
n = int(input())
arr = list(map(int, input().split()))
res = arr[0]
for i in range(1, n):
	res = gcd(res, arr[i])
print(divisors(res))


def gcd(x, y):
	while y != 0:
		(x, y) = (y, x % y)
	return x

def factorize(n):
	fct = []
	(b, e) = (2, 0)
	while b * b <= n:
		while n % b == 0:
			n = n // b
			e = e + 1
		if e > 0:
			fct.append((b, e))
		(b, e) = (b + 1, 0)
	if n > 1:
		fct.append((n, 1))
	return fct

def main():
	n = int(input())
	a = [int(x) for x in input().split()]
	g = a[0]
	for aa in a:
		g = gcd(g, aa)
	ans = 1
	fct = factorize(g)
	for f in fct:
		ans *= f[1] + 1
	print(ans)
main()


from functools import reduce
import math

def main():
	input()
	d = reduce(math.gcd, map(int, input().split()))
	res = 1 + (d != 1)
	for i in range(2, d):
		if i * i >= d:
			res += i * i == d
			break
		res += 2 * (not d % i)
	print(res)
main()


from sys import stdin, stdout
from collections import *
from math import *
st = lambda : list(stdin.readline().strip())
li = lambda : list(map(int, stdin.readline().split()))
mp = lambda : map(int, stdin.readline().split())
inp = lambda : int(stdin.readline())
pr = lambda n: stdout.write(str(n) + '\n')
mod = 1000000007

def solve():
	n = inp()
	l = li()
	g = 0
	for i in l:
		g = gcd(i, g)
	i = 1
	ans = 0
	while i * i <= g:
		if g % i == 0:
			ans += 1
			if i != g // i:
				ans += 1
		i += 1
	pr(ans)
for _ in range(1):
	solve()


from math import sqrt, ceil
from collections import defaultdict as dd
from math import gcd
n = int(input())
l = list(map(int, input().split()))
g = l[0]
d = dd(int)
for i in range(1, n):
	g = gcd(g, l[i])
while g % 2 == 0:
	d[2] += 1
	g = g // 2
for i in range(3, int(sqrt(g)) + 1, 2):
	while g % i == 0:
		d[i] += 1
		g = g // i
if g > 1:
	d[n] += 1
res = 1
for i in d:
	res = res * (d[i] + 1)
print(res)


from math import gcd
k = int(input())
n = sorted(list(map(int, input().split())))
if len(n) == 1:
	s = n[0]
	i = 1
	m = set()
	while i ** 2 <= s:
		if s % i == 0:
			m.add(i)
			if i != s // i:
				m.add(s // i)
		i += 1
	print(len(m))
	exit()
s = gcd(n[0], n[1])
for i in range(2, len(n)):
	s = gcd(s, n[i])
i = 1
m = set()
while i ** 2 <= s:
	if s % i == 0:
		m.add(i)
		if i != s // i:
			m.add(s // i)
	i += 1
print(len(m))


from __future__ import division, print_function
import os
import sys
from collections import Counter
from functools import reduce
from io import BytesIO, IOBase
from math import gcd
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def memodict(f):

	class memodict(dict):

		def __missing__(self, key):
			ret = self[key] = f(key)
			return ret
	return memodict().__getitem__

def pollard_rho(n):
	if n & 1 == 0:
		return 2
	if n % 3 == 0:
		return 3
	s = (n - 1 & 1 - n).bit_length() - 1
	d = n >> s
	for a in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]:
		p = pow(a, d, n)
		if p == 1 or p == n - 1 or a % n == 0:
			continue
		for _ in range(s):
			prev = p
			p = p * p % n
			if p == 1:
				return gcd(prev - 1, n)
			if p == n - 1:
				break
		else:
			for i in range(2, n):
				(x, y) = (i, (i * i + 1) % n)
				f = gcd(abs(x - y), n)
				while f == 1:
					(x, y) = ((x * x + 1) % n, (y * y + 1) % n)
					y = (y * y + 1) % n
					f = gcd(abs(x - y), n)
				if f != n:
					return f
	return n

@memodict
def prime_factors(n):
	if n <= 1:
		return Counter()
	f = pollard_rho(n)
	return Counter([n]) if f == n else prime_factors(f) + prime_factors(n // f)

def n_factors(n):
	a = 1
	for (p, exp) in prime_factors(n).items():
		a += a * exp
	return a
gcdm = lambda *args: reduce(gcd, args, 0)

def main():
	n = int(input())
	a = [int(i) for i in input().split()]
	print(n_factors(gcdm(*a)))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math
t = int(input())
a = list(map(int, input().rstrip().split(' ')))
count = 0
if t == 1:
	common = a[0]
	for i in range(1, int(math.sqrt(common)) + 1):
		if common % i == 0:
			count = count + 1
			if i != common / i:
				count = count + 1
else:
	common = math.gcd(a[0], a[1])
	for i in range(2, t):
		common = math.gcd(common, a[i])
	count = 0
	for i in range(1, int(math.sqrt(common)) + 1):
		if common % i == 0:
			count = count + 1
			if i != common / i:
				count = count + 1
print(count)


from sys import stdin
from sys import setrecursionlimit as SRL
SRL(10 ** 7)
rd = stdin.readline
rrd = lambda : map(int, rd().strip().split())
prime = []
isprime = [1] * (1000000 + 10)
for i in range(2, 1000003):
	if isprime[i]:
		prime.append(i)
	for j in prime:
		if i * j > 1000000:
			break
		isprime[i * j] = 0
		if i % j == 0:
			break

def gcd(a, b):
	if a % b == 0:
		return b
	return gcd(b, a % b)
n = int(input())
a = list(rrd())
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
ans = 1
for i in prime:
	tot = 0
	while g % i == 0:
		g = g // i
		tot += 1
	ans = ans * (1 + tot)
if g != 1:
	ans = ans * 2
print(ans)


import math
from functools import reduce
q = 1
for _ in range(q):
	n = int(input())
	p = list(set(map(lambda x: int(x), input().split())))
	g = reduce(math.gcd, p)
	count = 2 if g != 1 else 1
	for i in range(2, int(math.sqrt(g)) + 1):
		if g % i == 0:
			count += 2 if i * i != g else 1
	print(count)


from math import sqrt

def gcd(a, b):
	while b > 0:
		(a, b) = (b, a % b)
	return a

def gcd_list(A):
	n = len(A)
	if n == 0:
		return 1
	if n == 1:
		return A[0]
	g = gcd(A[0], A[1])
	for i in range(2, n):
		g = gcd(g, A[i])
	return g

def get_divisors(n):
	m = int(sqrt(n)) + 1
	divs = set()
	for d in range(1, m):
		if n % d == 0:
			divs.add(d)
			divs.add(n // d)
	return len(divs)
n = int(input())
A = [int(a) for a in input().split()]
g = gcd_list(A)
ans = 0
print(get_divisors(g))


import math

def allFactors(A):
	Q = []
	R = []
	for i in range(1, int(A ** 0.5) + 1):
		if A % i == 0:
			if i != A // i:
				Q.append(i)
				R.append(A // i)
			else:
				Q.append(i)
	for i in range(len(R) - 1, -1, -1):
		Q.append(R[i])
	return Q
t = int(input())
k = list(map(int, input().split()))
k.sort()
count = 0
if t == 1:
	print(len(allFactors(k[0])))
else:
	val = k[0]
	for i in range(1, len(k)):
		val = math.gcd(val, k[i])
	print(len(allFactors(val)))


from math import gcd, sqrt
import math
n = int(input())
array = list(map(int, input().split()))
res = array[0]
for i in range(1, n):
	res = gcd(res, array[i])
ans = 0
for i in range(1, math.ceil(sqrt(res + 1))):
	if res % i == 0:
		ans += 1
		if i != res / i:
			ans += 1
print(ans)


def gcd(a, b):
	while b > 0:
		(a, b) = (b, a % b)
	return a
from functools import reduce

def print_factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
a = int(input())
c = list(map(int, input().split()))
result = c[0]
for i in c[1:]:
	result = gcd(result, i)
finalans = print_factors(result)
print(len(finalans))


def mdc(u, v):
	while v:
		(u, v) = (v, u % v)
	return abs(u)
n = int(input())
lis = list(map(int, input().split()))
md = div = 0
for i in lis:
	md = mdc(md, i)
for i in range(1, int(md ** 0.5) + 1):
	if md % i == 0 and i ** 2 != md:
		div += 2
	elif md % i == 0:
		div += 1
print(div)


import math
n = int(input())
a = [int(x) for x in input().split()]
g = 0
for i in range(n):
	if g != 1:
		g = math.gcd(g, a[i])
i = 1
c = 0
while i * i <= g:
	if g % i == 0:
		if g // i == i:
			c = c + 1
		else:
			c += 2
	i = i + 1
print(c)


import sys
inf = float('inf')
(mod, MOD) = (1000000007, 998244353)
from math import ceil, floor, log, sqrt, factorial, pow, pi, gcd, log10, atan, tan

def all_factors(n):
	(small, large) = ([], [])
	for i in range(1, int(n ** 0.5) + 1, 2 if n & 1 else 1):
		if not n % i:
			small.append(i)
			large.append(n // i)
	if small[-1] == large[-1]:
		large.pop()
	large.reverse()
	small.extend(large)
	return small

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
n = int(input())
Arr = get_array()
g = Arr[0]
for i in range(1, n):
	g = gcd(g, Arr[i])
print(len(all_factors(g)))


from math import sqrt

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
n = int(input())
numeros = list(map(int, input().split()))
anterior = numeros[0]
for i in range(1, n):
	anterior = gcd(max(anterior, numeros[i]), min(anterior, numeros[i]))
ans = 0
i = 1
contador = 0
while i * i < anterior:
	if anterior % i == 0:
		contador += 2
	i += 1
if i * i == anterior:
	contador += 1
print(contador)


import math

def gcd(a, b):
	if a < b:
		(a, b) = (b, a)
	while a % b != 0:
		(a, b) = (b, a % b)
	return b
n = int(input())
a = list(map(int, input().split()))
if n == 1:
	r = a[0]
else:
	r = gcd(a[0], a[1])
	for i in range(2, n):
		r = gcd(r, a[i])
d = {}
d[2] = 0
while r % 2 == 0:
	d[2] += 1
	r //= 2
for i in range(3, int(r ** 0.5) + 6, 2):
	if i > r:
		break
	if r % i == 0:
		d[i] = 0
		while r % i == 0:
			r //= i
			d[i] += 1
if r != 1:
	d[r] = 1
e = 1
for key in d:
	e *= 1 + d[key]
print(e)


def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def factors_of_gcd(n):
	a = set()
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			a.add(i)
			a.add(n // i)
	return len(a)
from sys import stdin
n = int(stdin.readline().rstrip())
l = list(map(int, stdin.readline().rstrip().split(' ')))
if n >= 2:
	gcd = find_gcd(l[0], l[1])
	for i in range(2, n):
		gcd = find_gcd(gcd, l[i])
	print(factors_of_gcd(gcd))
else:
	print(factors_of_gcd(l[0]))


from math import gcd
n = int(input())
l = list(map(int, input().split()))
g = l[0]
for i in range(n):
	g = gcd(g, l[i])
	if g == 1:
		break
z = {1, g}
i = 2
t = pow(g, 0.5)
while i < t + 1:
	if g % i == 0:
		z.add(i)
		z.add(g // i)
	i += 1
print(len(z))


from math import gcd, sqrt

def factors(n):
	i = 1
	c = set()
	while i <= sqrt(n):
		if n % i == 0:
			c.add(i)
			c.add(n // i)
		i += 1
	return c
n = int(input())
a = list(map(int, input().split()))
gcdf = a[0]
for i in range(1, n):
	gcdf = gcd(gcdf, a[i])
if gcdf == 1:
	print(1)
else:
	print(len(factors(gcdf)))


from sys import stdin, stdout
read = stdin.readline
write = stdout.write
writeln = lambda x: write(str(x) + '\n')

def readint():
	return int(read())

def gcd(a, b):
	if b == 0:
		return a
	if a < b:
		return gcd(b, a)
	return gcd(b, a % b)

class Sol:

	@classmethod
	def input(cls):
		s = cls()
		s.n = int(read())
		s.arr = list(map(int, read().split()))
		return s

	def solve(self):
		r = self.arr[0]
		for x in self.arr:
			r = gcd(r, x)
		return self.num_divisor(r)

	def num_divisor(self, x):
		count = 0
		for i in range(1, int((x - 1) ** 0.5) + 1):
			if x % i == 0:
				count += 1
		count *= 2
		if x ** 0.5 % 1 == 0:
			count += 1
		return count
writeln(Sol.input().solve())


import math
import collections as cl
import itertools as it
import operator as op
(n, a) = (int(input()), list(map(int, input().split())))
g = a[0]
for i in range(1, n):
	g = math.gcd(g, a[i])
if g == 1:
	print(1)
else:
	divs = []
	d = 2
	sq = int(math.sqrt(g))
	while d <= sq:
		if g % d == 0:
			divs.append(d)
			g //= d
			sq = int(math.sqrt(g))
		else:
			d += 1
	divs.append(g)
	print(list(it.accumulate(map(lambda x: x + 1, cl.Counter(divs).values()), op.mul))[-1])


import math
n = int(input())
a = list(map(int, input().rstrip().split()))
gcdm = a[0]
l = set()
l.add(1)
l.add(gcdm)
for i in range(1, n):
	gcdm = math.gcd(a[i], gcdm)
if gcdm == 3:
	print(2)
	exit()
i = math.sqrt(gcdm)
i = int(i)
r = gcdm
ans = 0
for y in range(1, i + 1):
	if r % y == 0:
		ans += 1
		if r / y != i:
			ans += 1
print(ans)


n = int(input())
s = list(map(int, input().split()))
import math
k = s[0]
for i in range(0, n):
	k = math.gcd(s[i], k)
nod = {k, 1}
for i in range(2, int(k ** 0.5) + 1):
	if k % i == 0:
		nod.add(i)
		nod.add(k // i)
print(len(nod))


import math
n = int(input())
list1 = list(map(int, input().split()))
gcd = list1[0]
for i in range(1, n):
	gcd = math.gcd(list1[i], gcd)
count = 0
for i in range(1, int(math.sqrt(gcd)) + 1, 1):
	if gcd % i == 0:
		count += 1
		if i != gcd // i:
			count += 1
print(count)


import sys
LI = lambda : list(map(int, sys.stdin.readline().split()))
MI = lambda : map(int, sys.stdin.readline().split())
SI = lambda : sys.stdin.readline().strip('\n')
II = lambda : int(sys.stdin.readline())
from math import sqrt

def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)
(n, a) = (II(), LI())
d = a[0]
for v in a[1:]:
	d = gcd(d, v)
ans = 0
for i in range(1, int(sqrt(d)) + 1):
	if d % i == 0:
		ans += 2 if i * i != d else 1
print(ans)


import math
R = lambda : map(int, input().split())
n = int(input())
L = list(R())
g = L[0]
for i in range(1, n):
	g = math.gcd(g, L[i])
res = 0
for i in range(1, int(math.sqrt(g)) + 1):
	if g % i == 0:
		res += 1
		if i != g // i:
			res += 1
print(res)


from math import *
from collections import *
n = int(input())
arr = [int(p) for p in input().split()]
curr = max(arr)
for i in range(len(arr)):
	curr = gcd(curr, arr[i])
rt = sqrt(curr)
ans = 0
for i in range(1, int(rt) + 1):
	if curr % i == 0:
		ans += 2
if int(rt) == rt:
	print(ans - 1)
else:
	print(ans)


import sys
import math
import bisect

def main():
	n = int(input())
	A = list(map(int, input().split()))
	g = 0
	for a in A:
		g = math.gcd(g, a)
	ans = 0
	for i in range(1, math.floor(math.sqrt(g)) + 1):
		if g % i == 0:
			j = g // i
			if j == i:
				ans += 1
			else:
				ans += 2
	print(ans)
main()


from math import gcd
from math import sqrt
n = int(input())
l = list(map(int, input().split()))
a = l[0]
for i in range(1, n):
	a = gcd(a, l[i])
k = 0
e = int(sqrt(a)) + 1
for i in range(1, e):
	if a % i == 0:
		k += 1
		if a // i != i:
			k += 1
print(k)


n = int(input())
a = list(map(int, input().split()))
from math import gcd
(q, w) = (a[0], 0)
for i in a:
	q = gcd(q, i)
for i in range(1, int(q ** 0.5) + 1):
	if q % i == 0:
		if i != q / i:
			w += 2
		else:
			w += 1
print(w)


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

def gcd(a, b):
	if not a:
		return b
	if not b:
		return a
	return gcd(b, a % b)
cur = 0
for i in range(N):
	cur = gcd(cur, nums[i])
ans = 0
for i in range(1, int(pow(cur, 0.5)) + 1):
	if cur % i == 0:
		ans += 1
		if i * i != cur:
			ans += 1
print(ans)


from math import gcd, sqrt

def gcd_list(lst):
	if len(lst) == 1:
		return lst[0]
	result = gcd(lst[0], lst[1])
	for elem in lst[2:]:
		result = gcd(result, elem)
	return result
n = int(input())
a = [int(i) for i in input().split()]
g = gcd_list(a)
answer = 0
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		answer += 1
		if i != g // i:
			answer += 1
print(answer)


import math

def evklyd(a, b):
	if b == 0:
		return a
	return evklyd(b, a % b)
input()
nod = 0
for elem in list(map(int, input().split())):
	nod = evklyd(nod, elem)
if nod > 1:
	k = 0
	for i in range(1, int(math.sqrt(nod)) + 1):
		if nod % i == 0:
			k += 1
	k = k * 2 - (1 if int(math.sqrt(nod)) == math.sqrt(nod) else 0)
	print(k)
else:
	print(1)


import math

def printDivisors(n):
	count = 0
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				count += 1
			else:
				count += 2
		i = i + 1
	return count

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
a = input().split()
for i in range(n):
	a[i] = int(a[i])
if len(a) >= 2:
	num1 = a[0]
	num2 = a[1]
	gcd = find_gcd(num1, num2)
	for j in range(2, n):
		gcd = find_gcd(gcd, a[j])
	print(printDivisors(gcd))
else:
	print(printDivisors(a[0]))


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
count = 0
a = list(map(int, input().split()))
g = a[0]
for i in a:
	g = gcd(g, i)
s = math.sqrt(g)
if g == 1:
	print(g)
else:
	for i in range(1, int(s) + 1):
		if g % i == 0 and i * i != g:
			count += 2
		elif g % i == 0:
			count += 1
	print(count)


from math import gcd
n = int(input())
values = list(map(int, input().split(' ')))
count = 0
temp = 0
for i in range(len(values)):
	temp = gcd(temp, values[i])
for i in range(1, int(temp ** 0.5) + 1):
	if temp % i == 0:
		if temp // i == i:
			count += 1
		else:
			count += 2
print(count)


import math
from collections import defaultdict

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
arr = [int(x) for x in input().split()]
lim = arr[0]
for i in range(1, n):
	lim = min(lim, find_gcd(lim, arr[i]))
f = defaultdict(int)
for i in range(1, math.ceil(math.sqrt(lim)) + 1):
	if lim % i == 0:
		f[i] += 1
		f[lim // i] += 1
print(len(f))


from math import gcd
n = int(input())
li = list(map(int, input().split()))
s = 0
m = min(li)
for i in li:
	m = gcd(m, i)
ans = 1
i = 2
while i * i <= m:
	if m % i == 0:
		t = 0
		while m % i == 0:
			m //= i
			t += 1
		ans *= t + 1
	i += 1
if m > 1:
	ans *= 2
print(ans)


from math import *
import math
n = map(int, input())
a = list(map(int, input().split()))
s = 2

def GCD(t):
	r = t[0]
	for i in t:
		r = math.gcd(r, i)
	return r
x = GCD(a)
sq = ceil(math.sqrt(x))
i = 2
for i in range(2, sq):
	if x % i == 0:
		s = s + 2
i = i + 1
if i * i == x:
	s = s + 1
if x == 1:
	s = 1
print(s)


from math import gcd

def factor(n):
	count = 0
	for i in range(1, n + 1, 1):
		if i * i > n:
			break
		if n % i == 0:
			count += 1
			if n // i != i:
				count += 1
	return count

def main():
	n = input()
	val = list((int(v) for v in input().split()))
	v = val[0]
	for i in range(1, len(val)):
		v = gcd(v, val[i])
	s = factor(v)
	print(s)
main()


n = int(input())
A = list(map(int, input().split()))
GCD = 0
import math
for a in A:
	GCD = math.gcd(GCD, a)
x = GCD
L = int(math.sqrt(x))
FACT = dict()
for i in range(2, L + 2):
	while x % i == 0:
		FACT[i] = FACT.get(i, 0) + 1
		x = x // i
if x != 1:
	FACT[x] = FACT.get(x, 0) + 1
ANS = 1
for f in FACT:
	ANS *= FACT[f] + 1
print(ANS)


from math import gcd, sqrt, floor
from functools import reduce
n = int(input())
a = list(map(int, input().split()))
nod = reduce(gcd, a)
print(sum((2 if i != nod // i else 1 for i in range(1, floor(sqrt(nod)) + 1) if nod % i == 0)))


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

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
import math

def divisors(n):
	n1 = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				n1 = n1 + 1
			else:
				n1 = n1 + 2
	return n1
if a < 2:
	print(divisors(d[0]))
else:
	num1 = d[0]
	num2 = d[1]
	gcd = find_gcd(num1, num2)
	for i in range(2, len(d)):
		gcd = find_gcd(gcd, d[i])
	print(divisors(gcd))


def euclid(a, b):
	if b == 0:
		return a
	else:
		return euclid(b, a % b)

def find_divisor(num, start):
	for i in range(start, num + 1):
		if num % i == 0:
			return i
n = int(input())
nums = [int(elem) for elem in input().split()]
gcd = nums[0]
for i in range(1, len(nums)):
	gcd = euclid(gcd, nums[i])
cnt_dividor = 0
cur_divisor = 1
while cur_divisor * cur_divisor <= gcd:
	if gcd % cur_divisor == 0:
		cnt_dividor += 1
		if cur_divisor * cur_divisor < gcd:
			cnt_dividor += 1
	cur_divisor += 1
print(cnt_dividor)


from math import gcd
n = int(input())
l = list(map(int, input().split()))
g = l[0]
s = 0
for i in l:
	g = gcd(g, i)
for i in range(1, int(g ** 0.5) + 1):
	if i ** 2 == g:
		s = s + 1
	elif g % i == 0:
		s = s + 2
print(s)


from math import gcd
n = int(input())
(*l,) = map(int, input().split())
tmp = l[0]
for i in range(1, n):
	tmp = gcd(tmp, l[i])
if tmp != 1:
	c = 2
	for i in range(2, int(tmp ** 0.5 + 1)):
		if tmp % i == 0:
			c += 2
			if i * i == tmp:
				c -= 1
	print(c)
else:
	print(1)


import math

def printDivisors(n, b):
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				b.append(i)
			else:
				b.append(i)
				b.append(n // i)
		i = i + 1
	return b

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
a = list(map(int, input().split()))
b = list()
if len(a) > 1:
	num1 = a[0]
	num2 = a[1]
	gcd = find_gcd(num1, num2)
	for i in range(2, len(a)):
		gcd = find_gcd(gcd, a[i])
else:
	gcd = a[0]
lst = printDivisors(gcd, b)
cn = len(lst)
print(cn)


import sys
input = lambda : sys.stdin.readline().strip()
from math import *
n = int(input())
ls = list(map(int, input().split()))
g = ls[0]
for i in ls:
	g = gcd(g, i)
ls = []
for i in range(1, ceil(sqrt(g)) + 1):
	if g % i == 0:
		ls.append(i)
		ls.append(g // i)
print(len(set(ls)))


import math

def get_gcd(A):
	res = A[0]
	for i in range(1, len(A)):
		res = math.gcd(res, A[i])
	return res

def process(A):
	gcd = get_gcd(A)
	res = 0
	for i in range(1, int(math.sqrt(gcd)) + 1):
		if gcd % i == 0:
			res = res + 2
	if int(math.sqrt(gcd)) == math.sqrt(gcd):
		res = res - 1
	if gcd == 1:
		return 1
	else:
		return res
n = int(input())
A = []
for x in input().split():
	A.append(int(x))
print(process(A))


from math import gcd, sqrt
n = int(input())
l = [int(i) for i in input().split()]
num = l[0]
for i in range(n - 1):
	num = gcd(num, l[i + 1])
if num == 1 or num == 2:
	print(num)
elif num == 3:
	print(2)
else:
	sum = 0
	for i in range(1, int(sqrt(num)) + 1):
		if num % i == 0:
			if i != num // i:
				sum = sum + 2
			else:
				sum = sum + 1
	print(sum)


from math import gcd
from sys import stdin

def ii():
	return int(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def li():
	return list(mi())
n = ii()
a = li()
x = a[0]
for i in range(1, n):
	x = gcd(x, a[i])
(i, p) = (1, 0)
while i * i < x:
	if not x % i:
		p += 2
	i += 1
if i * i == x:
	p += 1
print(p)


n = int(input())
l = list(map(int, input().split()))
ans = 0

def get_gcd(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a
gcd = l[0]
for i in range(1, n):
	gcd = get_gcd(gcd, l[i])
for j in range(1, int(gcd ** 0.5) + 1):
	if gcd % j == 0:
		ans += 1
		if j != gcd // j:
			ans += 1
print(ans)


import math
n = int(input())
x = [int(x) for x in input().split()]
gcd = 0
answer = 0
for i in x:
	gcd = math.gcd(i, gcd)
for i in range(1, gcd + 1):
	if i * i > gcd:
		break
	elif gcd % i == 0 and i * i != gcd:
		answer += 2
	elif gcd % i == 0 and i * i == gcd:
		answer += 1
print(answer)


from sys import stdin
from sys import setrecursionlimit as SRL
SRL(10 ** 7)
rd = stdin.readline
rrd = lambda : map(int, rd().strip().split())

def gcd(a, b):
	if a % b == 0:
		return b
	return gcd(b, a % b)
n = int(input())
a = list(rrd())
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
ans = 1
i = 2
while i * i <= g:
	tot = 0
	while g % i == 0:
		g = g // i
		tot += 1
	ans = ans * (1 + tot)
	i += 1
if g != 1:
	ans = ans * 2
print(ans)


from math import gcd
from sys import stdin
n = int(input())
a = list(map(int, stdin.readline().split()))
g = gcd(a[0], a[min(1, n - 1)])
for i in range(2, n):
	g = gcd(g, a[i])
if g == 1:
	print(1)
else:
	ans = 0
	pos = set()
	for i in range(1, int(g ** 0.5) + 1):
		if g % i == 0:
			pos.add(g // i)
			pos.add(i)
	print(len(pos))


import math
n = int(input())
a = list(map(int, input().split()))
GCD = a[0]
for i in range(1, n):
	GCD = math.gcd(GCD, a[i])
gc = GCD
i = 1
c = 0
while i * i <= gc:
	if i * i == gc:
		c += 1
	elif gc % i == 0:
		c += 2
	i += 1
print(c)


import math

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def cd(n, a):
	v = a[0]
	a.pop(0)
	for i in a:
		v = gcd(v, i)
	re = 0
	for j in range(1, int(v ** 0.5) + 1):
		if v % j == 0:
			if v // j == j:
				re += 1
			else:
				re += 2
	return re
n = int(input())
a = input().strip().split()
a = list(map(int, a))
print(cd(n, a))


import math

def fnl(n):
	c = 0
	ln = int(math.sqrt(n))
	for i in range(1, ln + 1):
		if n % i == 0:
			if n / i == i:
				c += 1
			else:
				c += 2
	return c
N = int(input())
s = [int(x) for x in input().split()]
c = s[0]
for i in range(1, len(s)):
	c = math.gcd(c, s[i])
ans = fnl(c)
print(ans)


import math
numero = int(input())
lista = [int(x) for x in input().split()]
gcd = lista[0]
for i in range(1, len(lista)):
	gcd = math.gcd(gcd, lista[i])
contador = 0
for i in range(1, int(math.ceil(math.sqrt(gcd)))):
	if gcd % i == 0:
		contador += 2
if math.sqrt(gcd) % 1 == 0:
	contador += 1
print(contador)


from functools import reduce
import math

class Read:

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def list(sep=' '):
		return input().split(sep)

	@staticmethod
	def list_int(sep=' '):
		return list(map(int, input().split(sep)))

def divisorGenerator(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			l.append(i)
			if i * i != n:
				l.append(n // i)
	return l

def solve():
	n = Read.int()
	a = Read.list_int()
	m = reduce(math.gcd, a)
	res = list(divisorGenerator(m))
	print(len(res))
query_count = 1
for j in range(query_count):
	solve()


from math import sqrt

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
l = list(map(int, input().split()))
x = l[0]
for i in range(1, n):
	x = gcd(x, l[i])
factors = 0
for i in range(1, int(sqrt(x)) + 1):
	if x % i == 0:
		if x == i * i:
			factors += 1
		else:
			factors += 2
print(factors)


from collections import defaultdict as DD
from bisect import bisect_left as BL
from bisect import bisect_right as BR
from itertools import combinations as IC
from itertools import permutations as IP
from random import randint as RI
import sys
import math
MOD = pow(10, 9) + 7

def IN(f=0):
	if f == 0:
		return [int(i) for i in sys.stdin.readline().split()]
	else:
		return int(sys.stdin.readline())

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = IN(1)
a = IN()
g = a[0]
for i in range(1, n):
	g = GCD(g, a[i])
c = 0
a = set()
i = 1
while i * i <= g:
	if g % i == 0:
		a.add(i)
		a.add(g // i)
	i += 1
print(len(a))


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

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
arr = list(map(int, input().split()))
div = arr[0]
for i in range(1, n):
	div = gcd(div, arr[i])
res = 0
for i in range(1, int(math.sqrt(div)) + 1):
	if div % i == 0:
		res += 2
if int(math.sqrt(div)) ** 2 == div:
	res -= 1
print(res)


import math
n = int(input())
a = [int(i) for i in input().split()]
all_gcd = a[0]
for i in range(1, n):
	all_gcd = math.gcd(a[i], all_gcd)
if all_gcd == 1:
	print(1)
else:
	factorization = []
	for i in range(2, int(math.sqrt(all_gcd)) + 1):
		degree = 0
		while all_gcd % i == 0:
			degree += 1
			all_gcd = all_gcd // i
		factorization.append(degree + 1)
	if all_gcd != 1:
		factorization.append(2)
	ans = 1
	for i in factorization:
		ans *= i
	print(ans)


from math import factorial
fct = factorial

def gcd(a, b):
	(a, b) = (max(a, b), min(a, b))
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
u = list(map(int, input().split()))
for i in range(1, n):
	u[i] = gcd(u[i], u[i - 1])
x = u[-1]
if x == 1:
	print(1)
	exit()
i = 2
div = []
while i * i <= x:
	if x % i == 0:
		div.append(0)
		while x % i == 0:
			div[-1] += 1
			x //= i
	i += 1
if x != 1:
	div.append(1)
ans = 1
for i in range(len(div)):
	ans *= div[i] + 1
print(ans)


def gcd(x, y):
	if x < y:
		(x, y) = (y, x)
	if y == 0:
		return x
	return gcd(y, x % y)

def count_divisors(n):
	cnt = 0
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			cnt += 1
			if i != n // i:
				cnt += 1
	return cnt

def solve(n, A):
	if n == 1:
		return count_divisors(A[0])
	g = gcd(A[0], A[1])
	for i in range(n):
		g = gcd(g, A[i])
	return count_divisors(g)
n = int(input())
A = list(map(int, input().split()))
print(solve(n, A))


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
decimal.getcontext().prec = 46

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def modefiedSieve():
	mx = 10 ** 7 + 1
	sieve = [-1] * mx
	for i in range(2, mx):
		if sieve[i] == -1:
			sieve[i] = i
			for j in range(i * i, mx, i):
				if sieve[j] == -1:
					sieve[j] = i
	return sieve

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

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

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]), reverse=True)

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def DFS(n, s, adj):
	visited = [False for i in range(n + 1)]
	stack = []
	stack.append(s)
	while len(stack):
		s = stack[-1]
		stack.pop()
		if not visited[s]:
			visited[s] = True
		for node in adj[s]:
			if not visited[node]:
				stack.append(node)

def maxSubArraySum(a, size):
	maxint = 10 ** 10
	max_so_far = -maxint - 1
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def solve():
	n = int(input())
	arr = list_input()
	g = arr[0]
	for i in range(1, n):
		g = math.gcd(g, arr[i])
	print(len(getFactors(g)))
t = 1
for _ in range(t):
	solve()


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import ceil, floor
from copy import *
from collections import deque, defaultdict
from collections import Counter as counter
from itertools import combinations
from itertools import permutations as permutate
from bisect import bisect_left as bl
from operator import *
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192
from sys import stderr

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def pow(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def gcd(a, b):
	if a == b:
		return a
	while b > 0:
		(a, b) = (b, a % b)
	return a

def prefix_sum(ar):
	return list(accumulate(ar))

def suffix_sum(ar):
	return list(accumulate(ar[::-1]))[::-1]

def N():
	return int(inp())
dx = [0, 0, 1, -1]
dy = [1, -1, 0, 0]
from collections import defaultdict

def numberOfSetBits(i):
	i = i - (i >> 1 & 1431655765)
	i = (i & 858993459) + (i >> 2 & 858993459)
	return ((i + (i >> 4) & 252645135) * 16843009 & 4294967295) >> 24
from decimal import *

def solve():
	n = N()
	ar = lis()
	k = reduce(gcd, ar)
	t = factors(k)
	print(len(t))
solve()


from math import *

def nextInt():
	return int(input())

def nextInts():
	return list(map(int, input().split()))

def solve():
	n = nextInt()
	a = nextInts()
	res = 0
	for i in a:
		res = gcd(res, i)
	i = 1
	ans = 0
	while i * i < res:
		if res % i == 0:
			ans += 2
		i += 1
	if i * i == res:
		ans += 1
	return ans
print(solve())


from collections import defaultdict
import math
n = int(input())
a = list(map(int, input().split()))
x = a[0]
for i in range(1, n):
	x = math.gcd(x, a[i])
factor = 0
for i in range(1, int(math.sqrt(x)) + 1):
	if x == i * i:
		factor += 1
	elif x % i == 0:
		factor += 2
print(factor)


import math
q = int(input())

def gcd(a, b):
	if a == 0:
		return b
	if b == 0:
		return a
	if a > b:
		return gcd(b, a % b)
	else:
		return gcd(a, b % a)

def num_div(n):
	m = round(math.sqrt(n))
	count = 0
	for i in range(1, m + 1):
		if n % i == 0:
			count += 2
	if m ** 2 == n:
		count -= 1
	return count
a = [int(x) for x in input().split()]
g = a[0]
for i in range(1, len(a)):
	g = gcd(g, a[i])
print(num_div(g))


from math import *
n = int(input())
l = [int(x) for x in input().split()]
g = 0
for i in l:
	g = gcd(g, i)
i = 1
ans = 0
while i * i <= g:
	if i * i == g:
		ans += 1
	elif g % i == 0:
		ans += 2
	i += 1
print(ans)


import math as m

def gcdl(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
l = list(map(int, input().split()))
if n == 1:
	hf = l[0]
else:
	hf = gcdl(l[0], l[1])
	for i in range(2, len(l)):
		hf = gcdl(hf, l[i])
c = 0
s = int(hf ** 0.5)
for i in range(1, s + 1):
	if hf % i == 0 and i * i != hf:
		c += 2
	elif i * i == hf:
		c += 1
print(c)


import math
n = int(input())
a = list(map(int, input().split()))
g = 0
for aa in a:
	g = math.gcd(g, aa)
ans = 1
i = 2
while i * i <= g:
	if g % i == 0:
		t = 0
		while g % i == 0:
			g //= i
			t += 1
		ans *= t + 1
	i += 1
if g > 1:
	ans *= 2
print(ans)


n = int(input())
a = [int(x) for x in input().split()]
from math import gcd
g = 0
for i in a:
	g = gcd(g, i)
cnt = 0
d = 1
while d * d < g:
	if g % d == 0:
		cnt += 2
	d += 1
if d * d == g:
	cnt += 1
print(cnt)


from math import sqrt
i_liczb = int(input())
liczby = [int(x) for x in input().split()]

def nwd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
g = 0
for x in liczby:
	g = nwd(g, x)
wynik = 0
for x in range(1, int(sqrt(g)) + 1):
	if g % x == 0:
		wynik += 1
		if x != g / x:
			wynik += 1
print(wynik)


n = int(input())
a = list(map(int, input().split()))
nch = 0
for i in range(n):
	if a[i] % 2 == 1:
		nch += 1

def nod(a, b):
	while b != 0:
		t = a
		a = b
		b = t % b
	return a
k = 0
if n == 1:
	for i in range(1, int(a[0] ** 0.5) + 1):
		if a[0] % i == 0:
			if a[0] / i == a[0] ** 0.5:
				k += 1
			else:
				k += 2
	print(k)
	exit(0)
d = []
for i in range(1, n):
	d.append(nod(a[i - 1], a[i]))
min_d = min(d)
if nch and min_d % 2 == 0:
	for i in range(len(d)):
		if i < len(d) - 1:
			if d[i] % 2 == 0:
				d.pop(i)
	min_d = min(d)
	if min_d > min(a):
		print(1)
		exit(0)
	if min_d == 2:
		print(1)
		exit(0)
for i in range(n):
	if a[i] % min_d == 0:
		pass
	else:
		print(1)
		exit(0)
for i in range(1, int(min_d ** 0.5 + 1)):
	if min_d % i == 0:
		if min_d / i == min_d ** 0.5:
			k += 1
		else:
			k += 2
if min_d > min(a) ** 0.5 and min(a) / min_d % 1 != 0:
	print(1)
	exit(0)
print(k)


from collections import Counter

def gcd(a, b):
	(a, b) = sorted([a, b])
	if b % a == 0:
		return a
	return gcd(a, b % a)
n = int(input())
arr = list(map(int, input().split()))
g = arr[0]
for a in arr:
	g = gcd(g, a)
c = Counter()
d = 2
while g >= d * d:
	if g % d == 0:
		g //= d
		c[d] += 1
	else:
		d += 1
if g != 1:
	c[g] += 1
res = 1
for v in c.values():
	res *= v + 1
print(res)


from functools import reduce
from math import gcd

def genfactors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def main():
	n = int(input())
	arr = list(map(int, input().rstrip().split()))
	g = reduce(lambda x, y: gcd(x, y), arr)
	ans = len(genfactors(g))
	print(ans)
main()


import math
n = int(input())
l = list(map(int, input().split()))
gcdz = l[0]
for i in range(1, n):
	gcdz = math.gcd(gcdz, l[i])
(i, c) = (1, 0)
while i * i <= gcdz:
	if gcdz % i == 0:
		if i == gcdz // i:
			c += 1
		else:
			c += 2
	i += 1
print(c)


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
n = int(input())
a = [int(c) for c in input().split()]
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
ans = 0
for i in range(1, int(g ** 0.5) + 1):
	if g % i == 0:
		if g // i != i:
			ans += 2
		else:
			ans += 1
print(ans)


from math import gcd, sqrt

def maxPrimeFactors(n):
	ans = -1
	while n % 2 == 0:
		ans = 2
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			ans = i
			n = n // i
	if n > 2:
		ans = n
	return int(ans)
n = int(input())
x = list(map(int, input().split()))
g = x[0]
for i in range(n):
	g = gcd(g, x[i])
pfs = {}
gt = g
while gt != 1:
	p = maxPrimeFactors(g)
	if p == -1:
		break
	temp = 0
	while g % p == 0:
		g = g / p
		temp += 1
	pfs[p] = temp
ans = 1
for i in pfs:
	ans *= pfs[i] + 1
print(ans)


n = int(input())
l = [int(i) for i in input().split()]
l.sort()
l1 = [l[i] - l[i - 1] for i in range(1, n)]

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
g = 0
from math import sqrt as S
for i in l1:
	g = gcd(g, i)

def count_div(g):
	if g == 1:
		return 1
	c = 2
	for i in range(2, int(S(g)) + 1):
		if g % i == 0:
			c += 1
			if i != g // i:
				c += 1
	return c
if len(set(l)) == 1:
	print(count_div(l[0]))
	exit()
print(count_div(g))


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

def getArr():
	return list(map(int, input().split()))

def getStr():
	return input().strip()

def NOD(a, b):
	while a != 0 and b != 0:
		if a > b:
			a %= b
		else:
			b %= a
	return a + b

def numberDiv(N):
	res = 0
	for i in range(1, int(N ** 0.5) + 1):
		if N % i == 0:
			res += 1
			if i ** 2 != N:
				res += 1
	return res
N = getInt()
A = getArr()
nod = A[0]
for x in A:
	nod = NOD(nod, x)
n = numberDiv(nod)
print(n)


import math

def euclides_recursivo_mdc(dividendo, divisor):
	if divisor == 0:
		return dividendo
	else:
		return euclides_recursivo_mdc(divisor, dividendo % divisor)
n = int(input())
array = [int(x) for x in input().split()]
if n == 1:
	mdc = array[0]
elif n > 1:
	mdc = euclides_recursivo_mdc(array[0], array[1])
	for i in range(2, n):
		mdc = euclides_recursivo_mdc(mdc, array[i])
count = 0
squarRoot = math.sqrt(mdc)
j = 1
while j < squarRoot:
	if mdc % j == 0:
		count = count + 2
	j += 1
if mdc % squarRoot == 0:
	count += 1
if count == 0:
	count = 1
print(count)


from functools import reduce

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return abs(a)

def gcd_mult(numbers):
	return reduce(gcd, numbers)

def primeFactor(N):
	(i, n, ret, d, sq) = (2, N, {}, 2, 99)
	while i <= sq:
		k = 0
		while n % i == 0:
			(n, k, ret[i]) = (n // i, k + 1, k + 1)
		if k > 0 or i == 97:
			sq = int(n ** (1 / 2) + 0.5)
		if i < 4:
			i = i * 2 - 1
		else:
			(i, d) = (i + d, d ^ 6)
	if n > 1:
		ret[n] = 1
	return ret

def divisors(N):
	pf = primeFactor(N)
	ret = [1]
	for p in pf:
		ret_prev = ret
		ret = []
		for i in range(pf[p] + 1):
			for r in ret_prev:
				ret.append(r * p ** i)
	return sorted(ret)
N = int(input())
A = [int(a) for a in input().split()]
G = gcd_mult(A)
print(len(divisors(G)))


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

def gcd(a, b):
	if a % b == 0:
		return b
	return gcd(b, a % b)
from functools import reduce
g = reduce(gcd, a)
i = 2
ans = 1
while i * i <= g:
	tot = 0
	while g % i == 0:
		g = g // i
		tot += 1
	ans = ans * (tot + 1)
	i += 1
if g != 1:
	ans = ans * 2
print(ans)


from sys import stdin as sin

def aint():
	return int(input())

def amap():
	return map(int, sin.readline().split())

def alist():
	return list(map(int, sin.readline().split()))

def astr():
	return input()
from math import gcd
n = aint()
l = alist()
k = l[0]
for i in range(1, n):
	k = gcd(l[i], k)
ans = 0
for i in range(1, int(k ** 0.5) + 1):
	if k % i == 0:
		ans += 1
		if k // i != i:
			ans += 1
print(ans)


import sys
import math
input = sys.stdin.readline

def computeGCD(x, y):
	while y:
		(x, y) = (y, x % y)
		return x

def factorize(n):
	num = 1
	count = 0
	while n % 2 == 0:
		n >>= 1
		count += 1
	num *= count + 1
	for i in range(3, math.ceil(math.sqrt(n)) + 1, 2):
		count = 0
		while n % i == 0:
			count += 1
			n = n // i
		num *= count + 1
	if n > 2:
		num *= 2
	return num

def solve():
	n = int(input())
	A = list(map(int, input().split()))
	gcd = A[0]
	for i in range(1, n):
		gcd = math.gcd(A[i], gcd)
	ans = factorize(gcd)
	print(ans)
solve()


import math
n = int(input())
a = [int(x) for x in input().split()]

def solve(n):
	count = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n // i == i:
				count += 1
			else:
				count += 2
	return count
gcd = 0
for x in a:
	gcd = math.gcd(gcd, x)
print(solve(gcd))


import math
n = int(input())
a = [int(ele) for ele in input().split()]
gcdn = 0
for i in range(n):
	gcdn = math.gcd(gcdn, a[i])
count = 0
for i in range(1, int(math.sqrt(gcdn)) + 1):
	if gcdn % i == 0:
		if gcdn / i == i:
			count += 1
		else:
			count += 2
print(count)


from sys import stdin, stdout
from math import gcd, sqrt
input = stdin.readline
n = int(input())
arr = list(map(int, input().split()))
ans = 0
g = arr[0]
for i in range(1, n):
	g = gcd(g, arr[i])
for i in range(1, int(sqrt(g)) + 1):
	if i * i == g:
		ans += 1
	elif g % i == 0:
		ans += 2
print(ans)


import math
lst = []
n = int(input())
lst = input().split()
for i in range(len(lst)):
	lst[i] = int(lst[i])
gc = 0
p = 0
for i in lst:
	gc = math.gcd(gc, i)
for i in range(1, int(math.sqrt(gc)) + 1):
	if gc % i == 0:
		p += 2
		if gc / i == i:
			p -= 1
print(p)


import math as m
n = int(input())
a = [int(x) for x in input().split()]
gcd = a[0]
for i in range(len(a)):
	gcd = m.gcd(a[i], gcd)
k = {gcd, 1}
for i in range(2, int(gcd ** 0.5 + 1)):
	if gcd % i == 0:
		k.add(i)
		k.add(gcd // i)
print(len(k))


import math

def divs(x):
	ans = 0
	d = 1
	while d * d <= x:
		if x % d == 0:
			ans += 2
			ans -= d * d == x
		d += 1
	return ans
n = int(input())
arr = [int(x) for x in input().split()]
gcd = arr[0]
for a in arr:
	gcd = math.gcd(a, gcd)
print(divs(gcd))


import math
import sys

def main():
	input = sys.stdin.readline
	n = int(input())
	a = list(map(int, input().split()))
	b = a[0]

	def gcd(a, b):
		if b == 0:
			return a
		return gcd(b, a % b)
	for k in range(1, n):
		b = gcd(b, a[k])
	N = b
	P = [1, N]
	for k in range(2, math.floor(math.sqrt(N)) + 1):
		if N % k == 0:
			P.append(k)
			P.append(N // k)
	print(len(set(P)))
main()


from math import gcd, sqrt
n = int(input())
arr = [int(j) for j in input().split()]
g = 0
for x in arr:
	g = gcd(x, g)
se = set({})
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		se.add(i)
		se.add(g // i)
print(len(se))


from math import *
n = int(input())
k = list(map(int, input().split(' ')))
ebob = 0
for i in k:
	ebob = gcd(ebob, i)
i = 1
counter = 0
while i * i <= ebob:
	if i * i == ebob:
		counter += 1
	elif ebob % i == 0:
		counter += 2
	i += 1
print(counter)


import functools as f
import math as m

def gcd_list(l):
	return f.reduce(m.gcd, l)
(n, g) = (input(), gcd_list(map(int, input().split())))
sq = int(m.sqrt(g))
c = 0
for i in range(1, sq + 1):
	if i * i == g:
		c += 1
	elif g % i == 0:
		c += 2
print(c)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
arr = list(map(int, input().split()))
g = arr[0]
if n > 1:
	for i in range(1, n):
		g = gcd(g, arr[i])
if g == 1:
	print(1)
else:
	cnt = 1
	upper = int(pow(g, 0.5) + 1e-06)
	for i in range(2, upper + 1):
		if g % i == 0:
			cnt += 1
			if i * i != g:
				cnt += 1
	print(cnt + 1)


from math import gcd
n = int(input())
a = [int(i) for i in input().split()]
g = 0
cnt = 0
for i in range(n):
	g = gcd(g, a[i])
b = int(g ** 0.5)
for i in range(1, b + 1):
	if g % i == 0:
		cnt += 1 if g // i == i else 2
print(cnt)


import math
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for x in a:
	g = math.gcd(g, x)
t = 0
for x in range(1, int(math.sqrt(g)) + 1):
	if g % x == 0:
		if g // x == x:
			t += 1
		else:
			t += 2
print(t)


import math

def factors(x):
	result = []
	i = 1
	while i * i <= x:
		if x % i == 0:
			result.append(i)
			if x // i != i:
				result.append(x // i)
		i += 1
	return result
n = int(input())
arr = list(map(int, input().split()))
m = min(arr)
res = []
cnt = 0
check = 0
for i in arr:
	res.append(math.gcd(m, i))
t = min(res)
for i in res:
	if i % t == 0:
		check += 1
if check == n:
	ans = min(res)
	print(len(factors(ans)))
else:
	print(1)


from math import gcd
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a:
	ans = gcd(ans, i)
cnt = 0
for i in range(1, int(ans ** 0.5) + 1):
	if ans % i == 0:
		if ans // i != i:
			cnt += 2
		else:
			cnt += 1
print(cnt)


from math import gcd
import math
n = int(input())
a = [*map(int, input().split())]
g = a[0]
for i in a:
	g = gcd(g, i)
c = 0
for i in range(1, int(math.sqrt(g)) + 1):
	if not g % i:
		c += 2
		if g // i == i:
			c -= 1
print(c)


from math import *
n = int(input())
li = list(map(int, input().split(' ')))
g = li[0]
for i in range(1, n):
	g = gcd(li[i], g)
count = 0
i = 1
while i < int(sqrt(g)) + 1:
	if g % i == 0:
		count += 1
		if i != g // i:
			count += 1
	i += 1
print(count)


import math

def findfactors(x):
	i = 0
	cnt = 0
	while True:
		i += 1
		if i ** 2 > x:
			break
		if x % i == 0:
			cnt += 1
			if i ** 2 != x:
				cnt += 1
	return cnt
n = int(input())
a = map(int, input().split())
Gcd = 0
for x in a:
	Gcd = math.gcd(Gcd, x)
print(findfactors(Gcd))


from functools import reduce
from math import gcd

def factors(n):
	k = sorted(list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5 + 1)) if n % i == 0)))))
	return k
n = int(input())
lst = sorted(set([int(i) for i in input().split()]))
k = lst[0]
for i in range(1, len(lst)):
	k = gcd(k, lst[i])
print(len(factors(k)))


n = int(input())
l = list(map(int, input().split()))
import math
g = 1
if n > 1:
	g = math.gcd(l[1], l[0])
	for i in range(2, n):
		g = math.gcd(g, l[i])
	if g != 1:
		x = int(pow(g, 0.5)) + 1
		f = []
		for i in range(1, x + 1):
			if g % i == 0:
				f.append(g // i)
				f.append(i)
		print(len(set(f)))
	else:
		print(1)
else:
	x = l[-1]
	c = []
	for i in range(1, int(pow(x, 0.5)) + 1):
		if x % i == 0:
			c.append(i)
			c.append(x // i)
	print(len(set(c)))


def gcd(a, b):
	while a % b != 0:
		t = b
		b = a % b
		a = t
	return b
arr: list

def glgcd(l, r):
	if r == l:
		return arr[l]
	if r == l + 1:
		return gcd(arr[l], arr[r])
	mid = (l + r) // 2
	return gcd(glgcd(l, mid), glgcd(mid + 1, r))

def count(dd):
	eurat = [True] * 1100000
	primes = []
	if dd == 1:
		return 1
	for i in range(2, 1100000):
		if eurat[i]:
			primes.append(i)
			for j in range(i * 2, 1100000, i):
				eurat[j] = False
	ans = 1
	dd0 = dd
	for p in primes:
		if p * p > dd0:
			break
		if dd % p == 0:
			cn = 1
			while dd % p == 0:
				dd //= p
				cn += 1
			ans *= cn
	if dd != 1:
		ans *= 2
	return ans
n = int(input())
arr = list(map(int, input().split()))
maxd = glgcd(0, n - 1)
print(count(maxd))


def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def razl(n):
	cnt = 0
	i = 1
	while i * i < n:
		if n % i == 0:
			cnt += 2
		i += 1
	if i * i == n:
		cnt += 1
	return cnt
n = int(input())
ans = 0
for i in map(int, input().split()):
	ans = gcd(ans, i)
print(razl(ans))


def gcd(n1, n2):
	if n2 > n1:
		return gcd(n2, n1)
	if n2 == 0:
		return n1
	return gcd(n2, n1 % n2)

def factors(n):
	ans = 0
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			ans += 1
			if i != n // i:
				ans += 1
	return ans

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	g = 0
	for i in arr:
		g = gcd(i, g)
	facts = factors(g)
	print(facts)
main()


from functools import reduce

def sieve(n):
	numbers = list(range(2, n + 1))
	i = 0
	while i < len(numbers) and numbers[i] * 2 - 2 <= len(numbers):
		if numbers[i] > 0:
			prime = numbers[i]
			for j in range(prime * prime - 2, len(numbers), prime):
				numbers[j] = -1
		i += 1
	primes = list(filter(lambda x: x != -1, numbers))
	return primes

def factor(number, primes):
	factors = {}
	for p in primes:
		while number % p == 0:
			if p in factors:
				factors[p] += 1
			else:
				factors[p] = 1
			number //= p
	if number == 1:
		return factors
	else:
		factors[number] = 1
		return factors

def gcd(a, b):
	if a == 0:
		return b
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
a = list(set(map(int, input().split())))
s = sieve(10 ** 6)
if len(a) > 1:
	d = gcd(a[0], a[1])
	for i in range(2, len(a)):
		d = gcd(d, a[i])
	f = factor(d, s)
	if f == {}:
		print(1)
	else:
		print(reduce(lambda x, y: x * y, map(lambda x: x + 1, f.values())))
else:
	f = factor(a[0], s)
	if f == {}:
		print(1)
	else:
		print(reduce(lambda x, y: x * y, map(lambda x: x + 1, f.values())))


import math

def div(n):
	i = 1
	ans = []
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				ans.append(i)
			else:
				ans.append(i)
				ans.append(n // i)
		i = i + 1
	return ans
n = int(input())
l = set(map(int, input().split()))
l = list(l)
g = l[0]
for t in l:
	g = math.gcd(g, t)
ans = div(g)
print(len(ans))


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]

def factor(gc):
	ans = 0
	for i in range(1, int(sqrt(gc)) + 1):
		if gc % i == 0:
			ans += 1
			if gc // i != i:
				ans += 1
	return ans
n = Int()
a = list(set(array()))
gc = a[0]
for i in a[1:]:
	gc = min(gcd(i, gc), gc)
print(factor(gc))


def gcd(a, b):
	(a, b) = (max(a, b), min(a, b))
	if a * b == 0:
		return a
	if a % b == 0:
		return b
	return gcd(a % b, b)
n = int(input())
a = list(map(int, input().split()))
if n > 1:
	g = gcd(a[0], a[1])
else:
	g = a[0]
for i in range(2, n):
	g = gcd(g, a[i])
ans = 0
for i in range(1, int(g ** 0.5) + 1):
	if g % i == 0:
		if g // i == i:
			ans += 1
		else:
			ans += 2
print(ans)


import math

def divisors(num):
	list1 = set()
	for i in range(1, int(math.sqrt(num)) + 1):
		if num % i == 0:
			list1.add(i)
			list1.add(int(num / i))
	return list1

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
n = int(input())
a = list(map(int, input().split()))
prevlist = divisors(a[0])
if n == 1:
	print(len(prevlist))
else:
	gcd1 = gcd(a[0], a[1])
	if n > 2:
		for i in range(2, n):
			gcd1 = gcd(gcd1, a[i])
	divlist = divisors(gcd1)
	print(len(divlist))


from math import gcd

def input_ints():
	return list(map(int, input().split()))

def output_list(v):
	print(' '.join((str(x) for x in v)))

def main():
	n = input()
	a = input_ints()
	d = 0
	for x in a:
		d = gcd(d, x)
	i = 1
	ans = 0
	while i * i <= d:
		if d % i == 0:
			ans += 1 + (i * i != d)
		i += 1
	print(ans)
main()


n = int(input())
elements = list(map(int, input().split()))
gcd = 0
for e in elements:
	while gcd != 0:
		t = gcd
		gcd = e % gcd
		e = t
	gcd = e
counter = 0
for x in range(1, int(gcd ** 0.5) + 1):
	if gcd % x == 0:
		counter += 2
	if x * x == gcd:
		counter -= 1
print(counter)


from math import gcd
n = int(input())
a = [int(x) for x in input().split()]
if n == 1:
	g = a[0]
else:
	g = gcd(a[0], a[1])
for i in range(2, n):
	e = gcd(g, a[i])
	g = e
count = 0
i = 1
while i * i <= g:
	if not g % i:
		count += 2
		if i * i == g:
			count -= 1
	i += 1
print(count)


import math
n = int(input())
elementos = list(map(int, input().split()))
maiorDivCom = elementos[0]
for i in elementos[1:]:
	maiorDivCom = math.gcd(maiorDivCom, i)
res = 0
i = 1
raiz = math.sqrt(maiorDivCom)
while i <= raiz:
	if maiorDivCom % i == 0:
		res += 1
		if i * i != maiorDivCom:
			res += 1
	i += 1
print(res)


from functools import reduce
from math import gcd, sqrt
n = int(input())
a = [int(i) for i in input().split()]
k = reduce(lambda x, y: gcd(x, y), a)
c1 = 0
for i in range(1, int(sqrt(k)) + 1):
	if k % i == 0:
		c1 += 2
if sqrt(k) == int(sqrt(k)):
	c1 -= 1
print(c1)


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

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
z = len(a)
if z == 1:
	if a[0] == 1:
		print(1)
	else:
		c = 2
		p = 2
		while p * p <= a[0]:
			if p * p == a[0]:
				c += 1
			elif a[0] % p == 0:
				c += 2
			p += 1
		print(c)
else:
	num1 = a[0]
	num2 = a[1]
	gcd = find_gcd(num1, num2)
	for i in range(2, len(a)):
		gcd = find_gcd(gcd, a[i])
	if gcd == 1:
		print(1)
	else:
		m = min(a)
		st = set([1, m])
		c = 2
		p = 2
		while p * p <= gcd:
			if p * p == gcd:
				c = c + 1
			elif gcd % p == 0:
				c += 2
			p += 1
		print(c)


def gcd(a: int, b: int) -> int:
	return a if b == 0 else gcd(b, a % b)

def nof(n):
	if n == 1:
		return 1
	i = 1
	ans = 0
	while i * i <= n:
		if n % i == 0:
			ans += 2
			ans -= int(i * i == n)
		i += 1
	return ans
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for x in a:
	g = gcd(g, x)
print(nof(g))


import math
import sys
from collections import defaultdict

def prime_factors(n):
	while n % 2 == 0:
		yield 2
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			yield i
			n = n / i
	if n > 2:
		yield n

def is_prime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def gcd(a, b):
	if a == 1 or b == 1:
		return 1
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
n = int(next(sys.stdin))
nums = list(map(int, next(sys.stdin).split(' ')))
gcd_value = nums[0]
if n > 1:
	gcd_value = gcd(nums[0], nums[1])
	for i in range(2, n):
		gcd_value = gcd(nums[i], gcd_value)
amount = 0
primes = defaultdict(int)
if is_prime(gcd_value):
	print(2)
else:
	for divider in prime_factors(gcd_value):
		primes[divider] += 1
	acc = 1
	for _ in [_ + 1 for _ in primes.values()]:
		acc *= _
	print(acc)


import math
n = int(input())
l = list(map(int, input().split()))
num = l[0]
for i in range(1, n):
	num = math.gcd(l[i], num)
count = 0
for x in range(1, int(num ** 0.5) + 1):
	if num % x == 0:
		if num // x == x:
			count += 1
		else:
			count += 2
print(count)


import math
n = int(input())
arr = list(map(int, input().split()))
if n == 1:
	gcd = arr[0]
else:
	num1 = arr[0]
	num2 = arr[1]
	gcd = math.gcd(num1, num2)
	for i in range(2, n):
		gcd = math.gcd(gcd, arr[i])
i = 1
res = 0
while i <= math.sqrt(gcd):
	if gcd % i == 0:
		if gcd / i == i:
			res += 1
		else:
			res += 2
	i = i + 1
print(res)


def factors(n):
	return set((x for tup in ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0) for x in tup))

def find(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
lis = list(set(map(int, input().split())))
if len(lis) == 1:
	print(len(factors(lis[0])))
	exit()
gcd = find(lis[0], lis[1])
for i in range(2, len(lis)):
	gcd = find(gcd, lis[i])
ans = len(factors(gcd))
print(ans)


from math import gcd
n = int(input())
a = list(map(int, input().split()))
p = a[0]
for i in a:
	p = gcd(p, i)
s = 0
for i in range(1, int(p ** 0.5) + 1):
	if i ** 2 == p:
		s += 1
	elif p % i == 0:
		s += 2
print(s)


import math

def divisorGenerator(n):
	large_divisors = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			yield i
			if i * i != n:
				large_divisors.append(n // i)
	for divisor in reversed(large_divisors):
		yield divisor
n = int(input())
a = set(map(int, input().split()))
gcd = min(a)
for i in a:
	gcd = math.gcd(gcd, i)
	if gcd == 1:
		break
print(len(list(divisorGenerator(gcd))))


import collections, heapq, bisect, math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def solve(A):
	g = max(A)
	for a in A:
		g = gcd(g, a)
	out = 1 + int(g != 1)
	k = math.sqrt(g)
	for i in range(2, int(k) + 1):
		if g % i == 0:
			out += 2 if i != k else 1
	return out
q = 1
tests = []
for test in range(int(q)):
	n = input()
	tests.append([int(p) for p in input().split(' ')])
for A in tests:
	print(solve(A))


from __future__ import division, print_function
from sys import stdin, stdout
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
import heapq
from math import ceil, floor, log, sqrt, factorial, pow, pi, gcd
from fractions import Fraction

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

def fmi():
	return map(int, stdin.readline().split())

def fli():
	return list(fmi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def dfs(v, c):
	if visited[v]:
		if col[v] != c:
			print('-1')
			exit()
		return
	col[v] = c
	visited[v] = 1
	for i in graph[v]:
		dfs(i, c ^ 1)

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d.keys():
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = {}
	for i in range(n):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s

def printDivisors(n):
	i = 1
	count = 0
	while i <= sqrt(n):
		if n % i == 0:
			if n / i == i:
				count += 1
			else:
				count += 2
		i = i + 1
	return count
n = ii()
l = li()
x = l[0]
for i in range(1, n):
	x = gcd(l[i], x)
print(printDivisors(x))


import math
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for num in a:
	g = math.gcd(g, num)
ans = 1
if g > 1:
	ans += 1
for i in range(2, int(g ** 0.5) + 1):
	if g % i == 0:
		ans += 1
		if g / i > g ** 0.5:
			ans += 1
print(ans)


q = int(input())
x = [int(y) for y in input().split()]

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
x.sort()
g = x[0]
for k in x:
	g = gcd(k, g)
answer = 0
for i in range(1, int(g ** 0.5) + 1, 1):
	if g % i == 0:
		if i != g / i:
			answer += 2
		else:
			answer += 1
print(answer)


import math
n = int(input())
l = list(map(int, input().split()))
x = l[0]
for i in range(1, len(l)):
	x = math.gcd(x, l[i])
c = 0
for i in range(1, math.ceil(math.sqrt(x)), 1):
	if x % i == 0:
		c += 2
if x == 1:
	print(1)
else:
	q = int(math.sqrt(x))
	if q * q == x:
		print(c + 1)
	else:
		print(c)


from math import sqrt

def gcd(a, b):
	if b == 0:
		return a
	elif a == 0:
		return b
	return gcd(b % a, a)
a = int(input())
m = list(map(int, input().split()))
r = 0
f = m[0]
used = dict()
for i in range(1, a):
	f = gcd(f, m[i])
end = sqrt(f)
for i in range(1, int(end + 1)):
	if f % i == 0:
		r += 1
		if f // i != i:
			r += 1
print(r)


import os
import sys
from io import BytesIO, IOBase
from math import gcd, sqrt

def solution(arr, n):
	the_gcd = arr[0]
	for x in arr[1:]:
		the_gcd = gcd(the_gcd, x)
	res = 0
	for i in range(1, int(sqrt(the_gcd)) + 1):
		if the_gcd % i == 0:
			res += 2 if i != the_gcd // i else 1
	write(res)

def main():
	n = r_int()
	arr = r_array()
	solution(arr, n)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


from math import gcd, sqrt
from functools import reduce
from collections import Counter

def P(n):
	Q = []
	while not n % 2:
		Q.append(2)
		n //= 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while not n % i:
			Q.append(i)
			n //= i
	if n > 2:
		Q.append(n)
	return Q
n = int(input())
A = list(map(int, input().split()))
x = reduce(gcd, A)
x = Counter(P(x))
q = 1
for i in x:
	q *= x[i] + 1
print(q)


def gcd(a, b):
	if a == 0:
		return b
	if b == 0:
		return a
	r = 1
	while r > 0:
		r = a % b
		a = b
		b = r
	return a
n = int(input())
a = list(map(int, input().split()))
x = a[0]
for i in range(1, n):
	x = gcd(x, a[i])

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
l = make_divisors(x)
print(len(l))


import math

def gcd(a, b):
	if b == 0:
		return a
	aa = a % b
	return gcd(b, aa)

def factors(n):
	if n == 1 or n == 2:
		return n
	ct = [1, n]
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			if i not in ct:
				ct.append(i)
			if n // i not in ct:
				ct.append(i)
	return len(ct)
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
print(factors(g))


from collections import *
from inspect import currentframe
from math import *
from sys import stdin, stdout, stderr

def main():
	oo = 4557430888798830399
	eps = 1e-09

	def TR(n):
		if False:
			x = currentframe().f_back.f_locals[n]
			stderr.write('{} = {}\n'.format(n, x))
	ddict = defaultdict
	rl = stdin.readline
	rc = stdin.read
	wr = stdout.write
	n = int(rl())
	xs = sorted(map(int, rl().split()))
	TR('xs')
	diff = set((j - i for (i, j) in zip(xs, xs[1:])))
	diff.discard(0)
	TR('diff')
	try:
		div = min(diff)
	except ValueError:
		div = xs[0]
	TR('div')
	if div == 1:
		wr('1\n')
		return

	def get_factors(x):
		for i in range(1, int(sqrt(x)) + 1):
			if x % i == 0:
				yield i
				if i != sqrt(x):
					_i = x // i
					yield _i
	facs = sorted(get_factors(div), reverse=True)
	TR('facs')
	for fac in facs:
		if all((d % fac == 0 for d in diff)):
			res = len(list(get_factors(fac)))
			wr(f'{res}\n')
			return
main()


import math

def divCount(n):
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = int(input())
lst = []
lst = list(map(int, input().split()))
gcd = lst[0]
for i in range(1, len(lst)):
	gcd = find_gcd(gcd, lst[i])
print(divCount(gcd))


def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def main():
	a = int(input())
	b = input().split()
	y = int(b[0])
	for x in range(1, len(b)):
		y = gcd(int(y), int(b[x]))
	cnt = 0
	z = 1
	while z ** 2 < y:
		if y % z == 0:
			cnt += 2
		z += 1
	if z ** 2 == y:
		cnt += 1
	return cnt
print(main())


import math
import random

def miller_rabin_primalitytest(n, a):
	z = n - 1
	d = z
	while d % 2 == 0:
		d = d // 2
	if pow(a, d, n) != 1:
		x = d
		while x < n:
			r = pow(a, x, n)
			if r == n - 1:
				return 'Probable Prime'
			else:
				x = 2 * x
		return 'Composite'
	else:
		return 'Probable Prime'

def isprime(n):
	if n % 2 == 0 and n > 2:
		return False
	elif n == 2:
		return True
	else:
		if n < 2047:
			L = [2]
		elif n < 3215031751:
			L = [2, 3, 5, 7]
		elif n < 2152302898747:
			L = [2, 3, 5, 7, 11]
		elif n < 3474749660383:
			L = [2, 3, 5, 7, 11, 13]
		elif n < 341550071728321:
			L = [2, 3, 5, 7, 11, 13, 17]
		elif n < 3825123056546413051:
			L = [2, 3, 5, 7, 11, 13, 17, 19, 23]
		else:
			L = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]
		i = 0
		while i < len(L):
			if miller_rabin_primalitytest(n, L[i]) == 'Probable Prime':
				i += 1
			else:
				return False
		return True

def pollardrho(n):
	if isprime(n):
		return n
	else:
		x = random.randrange(2, n)
		y = x
		d = 1
		while d == 1:
			x = (pow(x, 2, n) + 1) % n
			y = (pow(y, 2, n) + 1) % n
			y = (pow(y, 2, n) + 1) % n
			d = math.gcd(abs(x - y), n)
		if d == n:
			return pollardrho(n)
		else:
			return d

def sieveoferathosthenes(n=10 ** 6 + 10):
	primes = []
	L = [True] * (n + 1)
	L[0] = L[1] = False
	j = 2
	while j <= n ** 0.5:
		if L[j]:
			k = j ** 2
			while k <= n:
				L[k] = False
				k += j
		j += 1
	for i in range(0, len(L)):
		if L[i]:
			primes.append(i)
	return primes

def factorize(n):
	if n == 1:
		return []
	elif isprime(n):
		return [n]
	else:
		factors = []
		x = int(n ** 0.5) + 2
		INT_MAX = 10 ** 6 + 10
		minsize = min(x, INT_MAX)
		L = sieveoferathosthenes(minsize)
		for i in range(0, len(L)):
			p = L[i]
			if n % p == 0:
				while n % p == 0:
					n = n // p
					factors.append(p)
		if n == 1:
			return factors
		elif isprime(n):
			factors.append(n)
			return factors
		else:
			fact = pollardrho(n)
			if isprime(fact):
				factors.append(fact)
				factors.append(n // fact)
			else:
				temp = fact
				temp1 = pollardrho(fact)
				factors += [temp1, fact // temp1, n // fact]
			return factors

def primefactorize(n):
	factorsdict = {}
	if n == 1:
		return factorsdict
	else:
		M = factorize(n)
		for i in range(0, len(M)):
			if M[i] in factorsdict.keys():
				factorsdict[M[i]] += 1
			else:
				factorsdict[M[i]] = 1
		return factorsdict
n = int(input())
L = list(map(int, input().split()))
g = L[0]
for i in range(0, n):
	g = math.gcd(g, L[i])
if g == 1:
	print(1)
else:
	dic = primefactorize(g)
	p = 1
	for e in dic.keys():
		p = p * (dic[e] + 1)
	print(p)


import math

def soln() -> None:

	def divCount(n):
		cnt = 0
		for i in range(1, int(math.sqrt(n)) + 1):
			if n % i == 0:
				if n / i == i:
					cnt += 1
				else:
					cnt += 2
		return cnt

	def logic() -> None:
		n = int(input())
		arr = [int(x) for x in list(set([x for x in input().split()]))]
		gcd = arr[0]
		for i in arr:
			gcd = math.gcd(i, gcd)
		print(divCount(gcd))
	logic()
soln()


from math import gcd

def gcdls(x):
	if len(x) == 1:
		return x[0]
	elif len(x) == 2:
		return gcd(x[0], x[1])
	else:
		gc = gcd(x[0], x[1])
		for i in range(2, len(x)):
			gc = gcd(gc, x[i])
		return gc
n = int(input())
a = list(map(int, input().split()))
a.sort()
gc = gcdls(a)
i = 1
s = set()
while i < int(gc ** 0.5) + 1:
	if gc % i == 0:
		s.add(i)
		s.add(gc // i)
	i += 1
print(len(s))


import math
n = int(input())
ls = list(map(int, input().split()))
div = ls[0]
for elt in ls[1:]:
	div = math.gcd(div, elt)
res = set()
i = 1
while i ** 2 <= div:
	if div % i == 0:
		res.add(i)
		res.add(div // i)
	i += 1
print(len(res))


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from math import *
n = ii()
l = il()
g = l[0]
for i in l:
	g = gcd(g, i)
sqt = int(g ** 0.5) + 1
ans = 0
for i in range(1, sqt):
	if g % i == 0:
		ans = ans + 1 if i == g // i else ans + 2
print(ans)


from math import gcd
from functools import reduce
input()
a = map(int, input().split())
d = reduce(gcd, a)
c = 0
i = 1
while i * i < d:
	if d % i == 0:
		c += 2
	i += 1
if i * i == d:
	c += 1
print(c)


from functools import reduce

def gdc(a, b):
	if b == 0:
		return a
	else:
		return gdc(b, a % b)
n = int(input())
z = list(map(int, input().split()))
if n >= 2:
	temp = gdc(z[0], z[1])
	for i in range(2, n):
		temp = gdc(temp, z[i])
else:
	temp = z[0]

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
print(len(factors(temp)))


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def divisor(n):
	ret = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			ret.append(i)
			if n // i != i:
				ret.append(n // i)
	return ret
n = int(input())
arr = list(map(int, input().split()))
tmp = arr[0]
for val in arr:
	tmp = gcd(tmp, val)
div = divisor(tmp)
print(len(div))


def mcm(a, b):
	if b == 0:
		return a
	else:
		return mcm(b, a % b)

def cantidadDivisores(div):
	count = 0
	i = 1
	while i * i < div:
		if div % i == 0:
			count += 2
		i += 1
	if i * i == div:
		count += 1
	return count
n = int(input())
numeros = list(map(int, input().split()))
divisor = numeros[0]
for i in range(1, n):
	divisor = mcm(divisor, numeros[i])
print(cantidadDivisores(divisor))


import math
size = int(input())
array = [int(el) for el in input().split()]

def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)

def getArrayGCD(array):
	if len(array) == 1:
		return array[0]
	arrayGcd = gcd(array[0], array[1])
	for i in range(2, len(array)):
		arrayGcd = gcd(arrayGcd, array[i])
	return arrayGcd
arrayGcd = getArrayGCD(array)
if arrayGcd == 1:
	print(1)
else:
	devidersCount = 0
	for i in range(1, int(math.sqrt(arrayGcd)) + 1):
		if i * i == arrayGcd:
			devidersCount += 1
		elif arrayGcd % i == 0:
			devidersCount += 2
	print(devidersCount)


from fractions import *

def number_of_divisors(n):
	if n == 0:
		return 0
	i = 2
	num = 1
	while i * i <= n:
		cnt = 1
		f = 0
		while n % i == 0:
			n //= i
			cnt += 1
			f = 1
		i += 1
		if f:
			num *= cnt
	if n > 1:
		num *= 2
	return num
(n, *a) = map(int, open(0).read().split())
b = a[0]
for i in a:
	b = gcd(b, i)
print(number_of_divisors(b))


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return factors
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
factors = prime_factors(g)
if len(factors) == 0:
	print(1)
	exit()
last = factors[0]
rep = [2]
for i in range(1, len(factors)):
	if factors[i] == last:
		rep[-1] += 1
	else:
		rep += [2]
		last = factors[i]
s = 1
for i in rep:
	s *= i
print(s)


from math import gcd, sqrt

def readInts():
	return [int(s) for s in input().split(' ')]

def main():
	n = readInts()[0]
	a = readInts()
	d = a[0]
	for i in range(1, n):
		d = gcd(d, a[i])
	ans = 0
	for m in range(1, int(sqrt(d)) + 1):
		if d % m == 0:
			ans += 1
			if m != d // m:
				ans += 1
	print(ans)
main()


def gcd2(a, b):
	if a < b:
		(a, b) = (b, a)
	while a % b != 0:
		(a, b) = (b, a % b)
	return b

def gcd(nums):
	if len(nums) == 0:
		return 0
	if len(nums) == 1:
		return nums[0]
	if len(nums) == 2:
		return gcd2(nums[0], nums[1])
	n = len(nums)
	a = gcd(nums[:n // 2])
	b = gcd(nums[n // 2:])
	return gcd2(a, b)
n = int(input())
a = [int(s) for s in input().split(' ')]
m = gcd(a)
res = 0
for i in range(1, m + 1):
	if i * i > m:
		break
	if m % i == 0:
		j = m // i
		if j >= i:
			if j == i:
				res += 1
			else:
				res += 2
		else:
			break
print(res)


import math

def gcd(x, b):
	while b > 0:
		(x, b) = (b, x % b)
	return x
n = int(input())
a = [int(x) for x in input().split()[:n]]
result = min(a)
for i in a:
	result = gcd(result, i)
if result == 1:
	print(1)
else:
	count = 0
	for i in range(1, int(math.sqrt(result) + 1)):
		if result % i == 0:
			if result // i != i:
				count += 2
			else:
				count += 1
	print(count)


def nod(x, y):
	while x > 0 and y > 0:
		if x > y:
			x = x % y
		else:
			y = y % x
	return x + y
n = int(input())
a = [int(x) for x in input().split()]
b = min(a)
for i in range(n):
	x = a[i]
	y = b
	b = nod(x, y)
k = 1
if b == 1:
	print(k)
else:
	k = 2
	m = int(b ** 0.5)
	while m > 1:
		if b % m == 0:
			if b // m == m:
				k += 1
			else:
				k += 2
		m -= 1
	print(k)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
a = list(map(int, input().split()))
amount_of_dicks_in_tsypkos_ass = 0
for i in a:
	amount_of_dicks_in_tsypkos_ass = gcd(amount_of_dicks_in_tsypkos_ass, i)
i = 1
amount_of_dicks_in_tsypkos_ass2 = 0
while i * i <= amount_of_dicks_in_tsypkos_ass:
	if amount_of_dicks_in_tsypkos_ass % i == 0:
		amount_of_dicks_in_tsypkos_ass2 += 1
		if i * i != amount_of_dicks_in_tsypkos_ass:
			amount_of_dicks_in_tsypkos_ass2 += 1
	i += 1
print(amount_of_dicks_in_tsypkos_ass2)


import math

def gcd(x, y):
	if y == 0:
		return x
	return gcd(y, x % y)

def printDivisors(n):
	i = 1
	cnt = 0
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				cnt += 1
			else:
				cnt += 2
		i = i + 1
	return cnt
n = int(input())
a = list(map(int, input().split()))
a.sort()
if n == 1 and a[0] != 1:
	print(printDivisors(a[0]))
elif n == 1 and a[0] == 1:
	print(1)
else:
	g = gcd(a[0], a[1])
	for i in range(2, n):
		g = gcd(g, a[i])
	print(printDivisors(g))


import math

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def printDivisors(n):
	i = 1
	c = 0
	while i <= math.sqrt(n):
		if n % i == 0:
			if n / i == i:
				c += 1
			else:
				c += 2
		i = i + 1
	return c
n = int(input())
l = list(map(int, input().split()))
if n == 1:
	print(printDivisors(l[0]))
else:
	gcd = find_gcd(l[0], l[1])
	for i in range(2, len(l)):
		gcd = find_gcd(gcd, l[i])
	print(printDivisors(gcd))


n = int(input())
a = [*map(int, input().split())]
a.sort()
from math import gcd
from functools import reduce
g = reduce(gcd, a)

def divisors(n):
	div = []
	for i in range(1, int(n ** (1 / 2)) + 1):
		if n % i == 0:
			div.append(i)
			if i * i != n:
				div.append(n // i)
	return len(div)
print(divisors(g))


def kd(n):
	ans = {1, n}
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			ans |= {n // i, i}
	return len(ans)

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
n = int(input())
a = list(map(int, input().split()))
common_gcd = a[0]
for x in a:
	common_gcd = gcd(common_gcd, x)
print(kd(common_gcd))


import math
n = input()
n = int(n)
d = [int(x) for x in input().split(' ')]
c = d[0]
e = d[0]
for i in range(1, len(d)):
	e = math.gcd(e, d[i])
	if e == 1:
		break
f = 1
x = e ** 0.5
for i in range(1, int(x)):
	if e % (i + 1) == 0:
		if i + 1 == x:
			f += 1
		else:
			f += 2
if e > 1:
	f += 1
print(f)


import math
from collections import Counter, defaultdict
from sys import stdin, stdout
input = stdin.readline
li = lambda : list(map(int, input().split()))

def countDivisors(n):
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
n = int(input())
a = li()
g = a[0]
for i in range(0, n):
	g = gcd(g, a[i])
print(countDivisors(g))


from sys import stdin
input = stdin.readline
from math import gcd
from math import sqrt

def countDivisors(n):
	cnt = 0
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt
n = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in a:
	ans = gcd(ans, i)
print(countDivisors(ans))


import math
a = int(input())
l = input().split()
gcd = math.gcd(int(l[0]), int(l[0]))
for i in l:
	i = int(i)
	gcd = math.gcd(gcd, i)
t = 0
for i in range(1, int(math.sqrt(gcd)) + 1):
	if gcd % i == 0:
		t += 1
		if i != math.sqrt(gcd):
			t += 1
print(t)


from math import sqrt, ceil

def gcd(a, b):
	while a != b:
		if a > b:
			a -= (a // b - 1 if a // b > 1 else 1) * b
		else:
			b -= (b // a - 1 if b // a > 1 else 1) * a
	return a

def p_decomp(n):
	p = 1
	ub = int(n ** (1 / 2)) + 1
	i = 2
	while i < ub:
		t = 0
		while n % i == 0:
			t += 1
			n = n // i
		if t > 0:
			p *= t + 1
		i += 1
	if n > 1:
		p *= 2
	return p
input()
xs = [int(x) for x in input().split()]
gcd_ = xs[0]
for x in xs:
	gcd_ = gcd(gcd_, x)
if gcd_ < 2:
	print('1')
	exit()
print(p_decomp(gcd_))


import atexit, io, sys
input_lines = sys.stdin.read().splitlines()
input = iter(input_lines).__next__
out_buffer = io.StringIO()
sys.stdout = out_buffer

@atexit.register
def write():
	sys.__stdout__.write(out_buffer.getvalue())
from math import sqrt, ceil

def line():
	return map(int, input().split())
n = int(input())
a = list(line())

def gcd2(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
q = a[0]
for w in a[1:]:
	q = gcd2(q, w)
p = 0
if q == 1:
	p = 1
else:
	w = sqrt(q)
	if w.is_integer():
		p += 1
	for e in range(1, ceil(sqrt(q))):
		if q % e == 0:
			p += 2
print(p)


def gcd(x, y):
	if y == 0:
		return x
	else:
		return gcd(y, x % y)

def makeDivisor(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
N = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, N):
	g = gcd(g, a[i])
ans = makeDivisor(g)
print(len(ans))


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
(n,) = I()
l = I()
g = l[0]
for i in range(1, n):
	g = gcd(g, l[i])

def fac(n):
	c = 0
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			c += 1
			if i ** 2 != n:
				c += 1
	return c
print(fac(g))


def gcd(a, b):
	if a % b == 0:
		return b
	elif b % a == 0:
		return a
	elif a > b:
		return gcd(b, a % b)
	else:
		return gcd(a, b % a)
n = int(input())
inp = list(map(int, input().split()))
k = inp[0]
for i in range(1, len(inp)):
	k = gcd(k, inp[i])
count = 0
for i in range(1, int(pow(k, 0.5)) + 1):
	if k % i == 0:
		if i * i != k:
			count += 2
		else:
			count += 1
print(count)


import math

def gcd(max_, min_):
	if max_ % min_ == 0:
		return min_
	else:
		return gcd(min_, max_ % min_)

def common_divisors(array):
	min_ = min(array)
	gcd_array = []
	gcd_ = array[0]
	for i in range(len(array)):
		gcd_ = gcd(array[i], gcd_)
		if gcd_ == 1:
			return 1
		gcd_array.append(gcd_)
	min_gcd = min(gcd_array)
	div_array = []
	n = 1
	sqrt = math.sqrt(min_gcd)
	while n < sqrt:
		if min_gcd % n == 0:
			div_array.append(n)
			div_array.append(min_gcd / n)
		n += 1
	if min_gcd % sqrt == 0:
		div_array.append(sqrt)
	return len(div_array)
n = int(input())
array = list(map(int, input().split()))
print(common_divisors(array))


from math import gcd, sqrt
from functools import reduce

def divs(n):
	c = 0
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			c += 1
			if n // i != i:
				c += 1
	return c
n = int(input())
a = list(map(int, input().split()))
g = reduce(gcd, a)
print(divs(g))


n = int(input())

def gcd(a, b):
	while b > 0:
		(a, b) = (b, a % b)
	return a
arr = list(map(int, input().split()))
g = arr[0]
for i in range(n):
	g = gcd(g, arr[i])
answer = 1
i = 2
while i * i <= g:
	if g % i == 0:
		cur = 0
		while g % i == 0:
			g //= i
			cur += 1
		answer *= cur + 1
	i += 1
if g > 1:
	answer *= 2
print(answer)


import sys
input = sys.stdin.readline
n = int(input())
A = [int(i) for i in input().split()]

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
g = A[0]
for i in range(1, n):
	g = gcd(g, A[i])
pf = {}
for i in range(2, int(g ** 0.5) + 1):
	while g % i == 0:
		pf[i] = pf.get(i, 0) + 1
		g //= i
if g > 1:
	pf[g] = 1
ans = 1
for k in pf.keys():
	ans *= pf[k] + 1
print(ans)


def gcd(a, b):
	r = a % b
	if r == 0:
		return b
	else:
		return gcd(b, r)

def main():
	n = int(input())
	ls = [int(i) for i in input().split()]
	d = ls[0]
	for i in range(1, n):
		d = gcd(d, ls[i])
	sqt = d ** 0.5
	i = 1
	cnt = 0
	while i <= sqt:
		if i == sqt:
			cnt += 1
		elif d % i == 0:
			cnt += 2
		i += 1
	print(cnt)
main()


import math
n = int(input())
a = map(int, input().split())
GCD = 0
for x in a:
	GCD = math.gcd(x, GCD)
ans = 0
i = 1
while i * i <= GCD:
	if GCD % i == 0:
		ans += 2
		if i * i == GCD:
			ans -= 1
	i += 1
print(ans)


import sys
from math import ceil, gcd, sqrt, floor

def main():
	_ = int(sys.stdin.readline())
	a = [int(x) for x in sys.stdin.readline().split(' ')]
	g = a[0]
	for x in a:
		g = gcd(g, x)
	if g == 1:
		return 1
	count = 0
	for i in range(1, ceil(sqrt(g))):
		if g % i == 0:
			if i ** 2 == g:
				count += 1
			else:
				count += 2
	if int(sqrt(g)) ** 2 == g:
		count += 1
	return count
print(main())


def delit(x):
	a = [1]
	b = []
	j = 2
	while j * j < x:
		if x % j == 0:
			a.append(j)
			b.append(x // j)
		j += 1
	if j * j == x:
		a.append(j)
	b.reverse()
	if x != 1:
		a = a + b + [x]
	return a
n = int(input())
c = list(map(int, input().split()))
m = min(c)
d = delit(m)
f = True
j = len(d) - 1
while f:
	f2 = True
	for i in range(n):
		if c[i] % d[j] > 0:
			f2 = False
			break
	if f2:
		f = False
	else:
		j -= 1
print(len(delit(d[j])))


import math

def gcd(a, b):
	while b != 0:
		c = a % b
		a = b
		b = c
	return a
n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
	g = gcd(a[i], g)
b = []
i = 2
u = int(math.sqrt(g))
while g != 1 and i <= u:
	if g % i != 0:
		i += 1
	else:
		g /= i
		if len(b) == 0 or b[-1][0] != i:
			b.append([i, 2])
		else:
			b[-1][-1] += 1
if g != 1:
	b.append([g, 2])
ans = 1
for elem in b:
	ans *= elem[1]
print(ans)


from math import gcd, sqrt
n = int(input())
a = list(map(int, input().split()))
g = gcd(a[0], a[-1])
total = 0
for i in range(0, len(a)):
	g = gcd(g, a[i])
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		if i == sqrt(g):
			total += 1
		else:
			total += 2
print(total)


def fac(n):
	count = 0
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n // i != i:
				count += 2
			else:
				count += 1
	return count
from math import gcd, sqrt
n = int(input())
l = list(map(int, input().split()))
k = 0
for i in l:
	k = gcd(k, i)
print(fac(k))


from math import sqrt

def gcd(a, b):
	if a % b == 0:
		return b
	return gcd(b, a % b)
n = int(input())
l = list(map(int, input().split()))
g = l[0]
for i in l:
	g = gcd(g, i)
c = 0
for i in range(1, int(sqrt(g)) + 1):
	if g % i == 0:
		if g // i != i:
			c += 2
		else:
			c += 1
print(c)


k = int(input())
l = list(map(int, input().split()))
from functools import reduce

def d(n):
	s = 2
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			s += 2
	if int(n ** 0.5) == n ** 0.5:
		s -= 1
	return s

def gcd(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a

def f(arr):
	x = reduce(lambda x, y: gcd(x, y), arr)
	return d(x)
print(f(l))


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def dif(a):
	ans = []
	i = 2
	while i ** 2 <= a:
		if a % i == 0:
			ans.append(i)
			a //= i
		else:
			i += 1
	if a > 1:
		ans.append(a)
	return ans

def con(arr):
	if len(arr) == 0:
		return []
	ans = []
	(count, now) = (0, arr[0])
	for i in arr:
		if i == now:
			count += 1
		else:
			ans.append(count)
			now = i
			count = 1
	return ans + [count]
n = int(input())
arr = [int(s) for s in input().split()]
x = arr[0]
for i in arr:
	x = gcd(x, i)
mas = con(dif(x))
ans = 1
for i in mas:
	ans *= i + 1
print(ans)


from math import gcd
from math import sqrt
from math import ceil
from math import floor
n = int(input())
l = [int(x) for x in input().split()]
mdc = l[0]
for x in range(1, len(l)):
	mdc = gcd(mdc, l[x])
res = 0
for i in range(1, ceil(sqrt(mdc))):
	if mdc % i == 0:
		res += 2
if sqrt(mdc) % 1 == 0:
	res += 1
print(res)


from math import gcd
n = int(input())
l = list(map(int, input().split()))
g = 0
for i in l:
	g = gcd(g, i)
i = 1
c = 0
while i * i <= g:
	if i * i == g:
		c += 1
	elif g % i == 0:
		c += 2
	i += 1
print(c)


def helper(n):
	ans = 0
	i = 1
	while i * i <= n:
		if n % i == 0:
			ans += 1
			if n // i != i:
				ans += 1
		i += 1
	return ans
from math import gcd
n = int(input())
arr = list(map(int, input().split()))
if n == 1:
	print(helper(arr[0]))
else:
	ans = gcd(arr[0], arr[1])
	for i in range(2, n):
		ans = gcd(ans, arr[i])
	print(helper(ans))


def gdc(a, b):
	while a != 0 and b != 0:
		if a > b:
			a = a % b
		else:
			b = b % a
	return a + b
n = int(input())
a = list(map(int, input().split()))
x = a[0]
for i in range(1, len(a)):
	x = gdc(x, a[i])
count = 0
for j in range(1, int(x ** 0.5) + 1):
	if x % j == 0:
		count += 1
if float(x ** 0.5) != int(x ** 0.5):
	count = 2 * count
else:
	count = 2 * count - 1
print(count)


from functools import reduce
from math import gcd
db = int(input())
a = sorted([int(x) for x in input().split()])
v = reduce(gcd, a)
divs = set(reduce(list.__add__, ([i, v // i] for i in range(1, int(v ** 0.5) + 1) if v % i == 0)))
print(len(divs))


from math import gcd
x = int(input())
(*li,) = map(int, input().split())
hcf = li[0]
li = set(li)
for i in li:
	hcf = gcd(hcf, i)
cnt = 0
for i in range(1, int(hcf ** 0.5) + 1):
	if not hcf % i:
		if hcf // i == i:
			cnt += 1
		else:
			cnt += 2
print(cnt)


import sys
import os
import collections
import math
n = int(input())
A = input()
A = A.split()
A = list(map(int, A))
_gcd = 0
for i in A:
	_gcd = math.gcd(_gcd, i)
count_ = 0
i = 1
while i * i < _gcd:
	if _gcd % i == 0:
		count_ += 2
	i += 1
if i * i == _gcd:
	count_ += 1
print(count_)


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def main():
	n = int(input())
	a = list(map(int, input().split()))
	if n >= 2:
		ans = gcd(a[0], a[1])
		for _a in a[2:]:
			ans = gcd(_a, ans)
	else:
		ans = a[0]
	y = set([1, ans])
	i = 2
	while i * i <= ans:
		if ans % i == 0:
			y.add(i)
			y.add(ans // i)
		i += 1
	print(len(y))
main()


from math import gcd
n = int(input())
l = list(map(int, input().split()))
s = list(set(l))
s.sort()
g = gcd(s[0], s[0])
for i in range(len(s)):
	g = gcd(g, s[i])
i = 1
ctr = 0
while i * i <= g:
	if g % i == 0:
		if i * i == g:
			ctr += 1
		else:
			ctr += 2
	i += 1
print(ctr)


n = 1000000 + 1
primes = []
sieve = [1] * n
for i in range(2, n):
	if sieve[i]:
		primes.append(i)
		for j in range(i << 1, n, i):
			sieve[j] = 0
n = int(input())
data = [int(i) for i in input().split()]
from math import gcd as g
gcd = data[0]
for i in range(1, n):
	gcd = g(gcd, data[i])
pw = 0
ans = 1
orig = gcd
for pr in primes:
	if gcd == 1:
		break
	while gcd % pr == 0:
		pw += 1
		gcd //= pr
	if pw > 0:
		ans *= pw + 1
		pw = 0
if gcd == 1:
	print(ans)
elif gcd == orig:
	print(2)
else:
	print(2 * ans)


def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)
n = int(input())
a = list(map(int, input().split()))
if n == 1:
	s = a[0]
else:
	s = gcd(a[0], a[1])
	for i in range(2, len(a)):
		s = gcd(s, a[i])
ans = 0
for i in range(1, int(s ** 0.5) + 2):
	if i ** 2 > s:
		break
	if s % i == 0:
		if i * i == s:
			ans += 1
		else:
			ans += 2
print(ans)


import math

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
n = int(input())
l = list(map(int, input().split()))
arr = []
p = l[0]
for i in range(1, n):
	p = gcd(p, l[i])
for i in range(1, int(math.sqrt(p)) + 1):
	if p % i == 0:
		arr.append(i)
		arr.append(p // i)
print(len(set(arr)))


from math import gcd
n = int(input())
a = list(map(int, input().split()))
b = 0
for i in a:
	b = gcd(i, b)
num_factors = 1
n = b
i = 2
while i * i <= n:
	power = 0
	while b % i == 0:
		b = b // i
		power += 1
	num_factors = num_factors * (power + 1)
	i += 1
if b > 1:
	num_factors = num_factors * 2
print(num_factors)


from sys import setcheckinterval, stdin
setcheckinterval(1000)

def iin():
	return int(stdin.readline())

def lin():
	return list(map(int, stdin.readline().split()))

def factors(a):
	fact = []
	if a % 2 == 0:
		ch = 0
		while a % 2 == 0:
			ch += 1
			a //= 2
		fact.append([2, ch])
	i = 3
	while i * i <= a:
		if a % i == 0:
			ch = 0
			while a % i == 0:
				ch += 1
				a //= i
			fact.append([i, ch])
		i += 2
	if a > 1:
		fact.append([a, 1])
	return fact
from math import gcd
n = iin()
a = lin()
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
i = 1
ans = 0
f = factors(g)
ans = 1
for i in f:
	ans *= i[1] + 1
print(ans)


import math
n = int(input())
nums = list(map(int, input().split()))

def gcd(a, b):
	if a % b == 0:
		return b
	return gcd(b, a % b)
g = nums[0]
for i in range(1, n):
	g = gcd(g, nums[i])
cnt = 0
s = int(math.sqrt(g))
for i in range(1, s + 1):
	if g % i == 0:
		cnt += 1
		if i * i != g:
			cnt += 1
print(cnt)


from math import sqrt, ceil

def commonDivisorsOf(array):
	array.sort()
	lowestValue = array[0]
	for factor in factorsOf(lowestValue):
		validFactor = testFactor(factor, array)
		if validFactor:
			return validFactor

def testFactor(factor, array):
	for value in array:
		if value % factor:
			return False
	return nFactorsOf(factor)

def factorsOf(n):
	if n == 1:
		yield 1
		return
	(factorsStorage, squareRoot_n) = ([], sqrt(n))
	limit = ceil(squareRoot_n)
	for value in range(1, limit):
		if not n % value:
			yield (n / value)
			factorsStorage.append(value)
	if squareRoot_n == limit:
		yield limit
	factorsStorage.reverse()
	for factor in factorsStorage:
		yield factor

def nFactorsOf(n):
	if n == 1:
		return 1
	squareRoot_n = sqrt(n)
	limit = ceil(squareRoot_n)
	nFactors = sum((2 for value in range(1, limit) if not n % value))
	return nFactors + 1 if squareRoot_n == limit else nFactors
input()
print(commonDivisorsOf(list(map(int, input().split()))))


import sys
input = sys.stdin.readline
import math

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)
	divisors.sort()
	return divisors
n = int(input())
a = list(map(int, input().split()))
b = a[0]
for i in range(1, n):
	b = math.gcd(b, a[i])
print(len(make_divisors(b)))


n = int(input())
A = list(map(int, input().split()))
import math
from functools import reduce

def gcd(*numbers):
	return reduce(math.gcd, numbers)

def gcd_list(numbers):
	return reduce(math.gcd, numbers)

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
g = gcd_list(A)
d = make_divisors(g)
print(len(d))


from collections import defaultdict as dd
from collections import Counter as ccd
from itertools import permutations as pp
from itertools import combinations as cc
from random import randint as rd
from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq as hq
from math import gcd
mod = pow(10, 9) + 7

def inp(flag=0):
	if flag == 0:
		return list(map(int, input().strip().split(' ')))
	else:
		return int(input())

def nof(n):
	a = set()
	i = 1
	while i * i <= n:
		if n % i == 0:
			a.add(i)
			a.add(n // i)
		i += 1
	return len(a)

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
l = list(map(int, input().strip().split(' ')))
hcf = l[0]
for i in range(1, n):
	hcf = gcd(hcf, l[i] % hcf)
print(nof(hcf))


import sys
from math import sqrt
input()
s = input()
d = [int(val) for val in s.split(' ')]

def gcd(a, b):
	while b != 0:
		if b > a:
			(a, b) = (b, a)
		else:
			r = a % b
			a = r
	return a
_gcd = d[0]
for e in d:
	_gcd = gcd(_gcd, e)

def divs(n):
	d = 0
	for i in range(1, int(sqrt(n) + 1)):
		if n % i == 0:
			if n == i * i:
				d += 1
			else:
				d += 2
	return d
print(divs(_gcd))


import math

def gcd(a, b):
	if a == 0:
		return b
	else:
		return gcd(b % a, a)
n = int(input())
a = list(map(int, input().split()))
t = 0
div = 0
if n != 1:
	for i in range(1, n):
		if i == 1:
			div = gcd(a[i], a[i - 1])
		else:
			div = gcd(div, a[i])
else:
	div = a[0]
i = 1
while i <= math.sqrt(div):
	if div % i == 0:
		if div // i == i:
			t += 1
		else:
			t += 2
	i += 1
print(t)


def main():
	from math import gcd
	n = int(input())
	a = list(map(int, input().split()))
	res = 0
	for i in a:
		res = gcd(res, i)
	p = []
	cnt = 0
	while res % 2 == 0:
		cnt += 1
		res //= 2
	p.append(cnt)
	i = 3
	while i * i <= res:
		cnt = 0
		while res % i == 0:
			cnt += 1
			res //= i
		if cnt > 0:
			p.append(cnt)
		i += 1
	if res > 1:
		p.append(1)
	ans = 1
	for i in p:
		ans *= i + 1
	print(ans)
	return
main()


from math import gcd

def factors(x):
	result = []
	i = 1
	while i * i <= x:
		if x % i == 0:
			result.append(i)
			if x // i != i:
				result.append(x // i)
		i += 1
	return result
n = int(input())
array = list(map(int, input().split()))
if n > 1:
	a = gcd(array[0], array[1])
	for i in range(n):
		d = gcd(a, array[i])
		a = d
	print(len(factors(a)))
else:
	print(len(factors(array[0])))


import sys
import math
input = sys.stdin.readline

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def factors(g):
	f = 0
	i = 1
	while i <= math.sqrt(g):
		if g % i == 0:
			if i == g // i:
				f += 1
			else:
				f += 2
		i += 1
	return f
n = int(input())
arr = list(map(int, input().split()))
g = arr[0]
for i in range(n):
	g = gcd(g, arr[i])
print(factors(g))