import math
import itertools
import functools
 
_ = input()
A = list(map(int, input().split()))
 
for a, b in itertools.combinations(A, 2):
    if math.gcd(a, b) != 1:
        if functools.reduce(math.gcd, A) == 1:
            print('setwise coprime')
        else:
            print('not coprime')
        break
else:
    print('pairwise coprime')