import numpy as np
N = int(input())
A = list(map(int, input().split()))
flg = True
for i in range(N-1):
    if sum(np.gcd(A[i], A[i+1:])) != N-i-1:
        break
else:
    print('pairwise coprime')
    exit()
if np.gcd.reduce(A) == 1:
    print('setwise coprime')
else:
    print('not coprime')
