#ここまでテンプレ
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

n = int(stdin.readline().rstrip())
a = list(map(int,stdin.readline().rstrip().split()))

import fractions

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

ans = a[0]

se = set()
flag = False

if a[0] != 1:
    lin = make_divisors(a[0])[1:]
    for j in lin:
        se.add(j)

for i in range(1, n):
    ans = fractions.gcd(ans, a[i])
    if a[i] != 1 and flag == False:
        lin = make_divisors(a[0])[1:]
        for j in lin:
            if j in se:
                flag = True
                break
            else:
                se.add(j)
    
if ans == 1 and flag == False:
    print("setwise coprime")
elif ans == 1:
    print("setwise coprime")
else:
    print("not coprime")