# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read

n,*a = map(int,read().split())

M = 10**6
r = [0]*(M+1)
for i in a:
    r[i] += 1


isp = True
for x in range(2,M+1):
    c = sum(r[x::x])
    if c == n:
        print("not coprime")
        exit()
    if c >= 2:
        isp = False
else:
    if isp:
        print("pairwise coprime")
    else:
        print("setwise coprime")







