import math

def solve(arr,n):
    flag = True

    for i in range(1,n):
        if math.gcd(arr[i-1],arr[i]) != 1:
            flag = False
    
    if flag == True:
        return "pairwise coprime"

    elif flag != True:
        res = arr[0]
        for i in arr[1:]:
            res = math.gcd(res, i)
        if res != 1:
            return "not coprime"
        else:
            return "setwise coprime"



n = int(input())
arr = list(map(int, input().split()))

print(solve(arr,n))