# In[]:
import math
from functools import reduce


# In[]:
def gcd_list(numbers):
    return reduce(math.gcd, numbers)


# In[]:
N = int(input())
input_str = input()
input_list = input_str.split()
input_int = [int(x) for x in input_list]

# In[]:
gcd_all = gcd_list(input_int)
if gcd_all != 1:
    print('not coprime')
else:
    flag = 0
    for idx, i in enumerate(input_int):
        for j in input_int[idx+1:]:
            if math.gcd(i, j) != 1:
                flag = 1
                break
        else:
            continue
        break
    if flag == 1:
        print('setwise coprime')
    elif flag == 0:
        print('pairwise coprime')
