import math
import itertools

_ = input()
A = list(map(int, input().split()))

for a, b in itertools.combinations(A, 2):
    if math.gcd(a, b) != 1:
        a = A[0]
        for _a in A[1:]:
            a = math.gcd(a, _a)
            if a == 1:
                print('setwise coprime')
                break
        else:
            print('not coprime')
        break
else:
    print('pairwise coprime')
