n = input()
As = list(map(int, input().split()))
import math
gcd = As[0]
for a in As[1:]:
    tmp = gcd
    gcd = math.gcd(tmp, a)

if gcd > 1:
    print("not coprime")
    exit()
flg = 0
lcd = As[0]
prod = As[0]
for a in As[1:]:
    if math.gcd(a,lcd) != 1:
        print("setwise coprime")
        exit()
    lcd = a*lcd//math.gcd(a,lcd)
 
print("pairwise coprime")

    