import sys
import  math
import fractions
from collections import defaultdict
import heapq
import numpy as np
from bisect import bisect_left,bisect

stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))


def factorization(c,n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(i)
            c[i]+=1
            if(c[i]==2):
                flag=False
                return c,flag

    if temp!=1:
        arr.append(temp)
        c[temp]+=1
        if(c[temp]==2):
            flag=False
            return c,flag

    if arr==[]:
        c[n]+=1
        if(c[n]==2):
            flag=False
            return c,flag

    flag=True
    return c,flag

def factorization1(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr

def factorization2(c2,n):
    arr = []
    temp = n
    for i in c2:
        if temp%i==0:
            arr.append(i)

    return arr

N=int(input())
A=nl()
c=[0]*(10**6)
flag=True
for i in range(N):
    if(flag==True):
        c,flag=factorization(c,A[i])
    else:
        break

if(flag==True):
    print("pairwise coprime")
    sys.exit(0)

c2=factorization1(A[0])
for i in range(N):
        c2=factorization2(c2,A[i])
        if(c2==[]):
            print("setwise coprime")
            sys.exit(0)

print("not coprime")

    

