from math import gcd
from functools import reduce
def solution(A):
    ret = [gcd(A[i], A[j]) for i in range(len(A)) for j in range(i + 1, len(A))]
    if all([x==1 for x in ret]):
        return 'pairwise coprime'
    else:
        x = reduce(gcd, A)
        if x == 1:
            return 'setwise coprime'
    return 'not coprime'

input()
A = list(map(int, input().split()))
print(solution(A))
