import numpy as np

N = int(input())
A = list(map(int, input().split()))
exist = np.zeros(10**6+1, dtype=int)
for a in A:
    exist[a] += 1

if np.gcd.reduce(A) != 1:
    print('not coprime')
elif np.all([exist[i::i].sum() <= 1 for i in range(2, 10**6+1)]):
    print('pairwise coprime')
else:
    print('setwise coprime')