import sys
from math import gcd

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

b = gcd(a[0], a[1])
for i in range(2, n):
    b = gcd(b, a[i])
if b != 1:
    print('not coprime')
else:
    
    c = set()
    for j in a:
        for i in range(2, int(j**0.5)+1):
            while n%i == 0:
                if i in c:
                    print('setwise coprime')
                    sys.exit()
                c.add(i)
                n //= i
            if n != 1:
                c.add(n)
    print('pairwise coprime')
