# coding:UTF-8
import sys
from math import factorial

MOD = 10 ** 9 + 7
INF = 10000000000

# 約数　倍数
def gcb(a, b):
    if b == 0:
        return a
    else:
        return gcb(b, a % b)

def lcm(a, b):
    d = gcb(a, b)
    return int(a / d * b)

def divisorList(a):
    l = []
    for i in range(1, int(a**0.5)+1):
        if a % i == 0:
            l.append(i)
            ii = a / i
            if i != ii:
                l.append(ii)
    return sorted(l)

def primeNumList(a):
    if a <= 1:
        return []
    else:
        multiple_list = [2]
        serial_number_list = [r for r in range(2, a + 1) if r % 2 != 0]

        # 5. 連番リストの先頭が、入力値の平方根以上で終了
        while len(serial_number_list) > 0:
            multiple_list.append(serial_number_list[0])
            for serial_number in range(serial_number_list[0], serial_number_list[- 1] + 1, serial_number_list[0]):
                if serial_number in serial_number_list:
                    serial_number_list.remove(serial_number)

        return multiple_list

def main():
    # ------ 入力 ------#
    n = int(input())    # 数字
    aList = list(map(int, input().split()))     # スペース区切り連続数字

    # ------ 処理 ------#
    amax = max(aList)
    pl = primeNumList(amax)
    countList = [0] * len(pl)
    for a in aList:
        for i in range(len(pl)):
            if a % pl[i] == 0:
                countList[i] += 1

    # ------ 出力 ------#
    m = max(countList)
    if m == len(aList):
        print("not coprime")
    elif m >= 2:
        print("setwise coprime")
    else:
        print("pairwise coprime")


if __name__ == '__main__':
    main()
