import math
from functools import reduce

N = int(input())
A = [int(x) for x in input().split()]

if reduce(math.gcd, A) != 1:
    print("not coprime")
else:
    flg = 0
    arr = []
    for l in range(N):
        temp = A[l]
        for i in range(2, A[l]+1):
            if temp%i==0:
                if i in arr:
                    flg = 1
                else:
                    while temp%i==0:
                        temp //= i
                    arr.append(i)

            if temp!=1:
                if temp in arr:
                    flg = 1
                else:
                    arr.append(temp)
                    break

            if flg == 1:
                break
        if flg == 1:
            break
    if flg == 1:
        print("setwise coprime")
    else:
        print("pairwise coprime")
