import numpy as np
n = int(input())
aa = np.array(input().split(), dtype='int')
ma = np.max(aa)
cnt = np.zeros(max(aa)+1, dtype='int')

for a in aa:
    cnt[a] += 1

if np.gcd.reduce(aa) != 1:
    print('not coprime')
elif np.all([cnt[i::i].sum() <= 1 for i in range(2, np.sqrt(ma+1).astype(int)+1)]):
    print('pairwise coprime')
else:
    print('setwise coprime')