import fractions
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**18
def solve(N,A):
    P = set()

    for i in range(N):
        n = A[i]
        if n % 2 == 0 and 2 in P: break
        while n % 2 == 0:
            P.add(2)
            n //= 2
            
        f = 3
        while f * f <= n:
            if n % f == 0:
                if f in P: break
                P.add(f)
                while n%f == 0:
                    n //= f
            else:
                f += 2
        else:
            if n != 1:
                if n in P: break
                P.add(n)
            
            continue
        break
    else:
        return 0
        
    return 1 

def get_gcd(X):
	gcd = X[0]
	for x in X[1:]:
	    gcd = fractions.gcd(x, gcd)
	return gcd

def main():
    N=ii()
    A=list(mi())

    flag = solve(N,A)
    if flag == 0:
        print("pairwise coprime")
    else:
        gcd = get_gcd(A)
        if gcd == 1:
            print("setwise coprime")
        else:
            print("not coprime")
       

if __name__ == '__main__':
    main()
