check_list = [0]*1000010
conf = False

def get_prime(m):
    global check_list
    global conf
    pf = {}
    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:pf[m]=1
    
    for i in pf.keys():
        if check_list[i] >= 1:
            conf = True
            check_list[i] += 1
        elif check_list[i] == 0:
            check_list[i] = 1

    return pf

def main():
    N = int(input())
    A = list(map(int, input().split()))
    for i in range(len(A)):
        get_prime(A[i])
    if max(check_list) == len(A):
        return "not coprime"
    else:
        if conf:
            return "setwise coprime"
        else:
            return "pairwise coprime"

if __name__ == '__main__':
    print(main())