import numpy as np

N = int(input())
A = list(map(int, input().split()))
B = np.array(list(zip(A, A[1:])))
res = np.gcd.reduce(B, axis=1)
if res.mean() == 1:
    print('pairwise coprime')
elif np.gcd.reduce(A) == 1:
    print('setwise coprime')
else:
    print('not coprime')
