import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)
N=int(input())
D=[int(s) for s in input().split()]
if gcd_list(D)!=1:
    print("not coprime")
else:
    for i in range(N-1):
        for j in range(i+1,N):
            if gcd(D[i],D[j])!=1:
                print("setwise coprime")
                break
            elif i==N-1 and j==N:
                print("pairwise coprime")