import math
from functools import reduce

n = int(input())
a = list(map(int, input().split()))
flag =1
if reduce(math.gcd, a) != 1:
        print("not coprime")
        flag = 0
if flag == 1:
        for i  in range(n):
                for j in range(i, n):
                        if a[i] != a[j]:
                                if math.gcd(a[i], a[j]) != 1:
                                        print("setwise coprime")
                                        flag = 0
                                        break
                        else:
                                continue
                break
if flag == 1:
        print("pairwise coprime")