import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

N = int(input())
A = [int(i) for i in input().split()]

def main():
    if gcd_list(A) != 1:
        print("not coprime")
        exit()

    flag = True
    LCM = A[-1]
    for i in range(N - 2, -1, -1):
        if LCM // A[i] == (LCM + A[i] - 1) // A[i]:
            flag = False
            break

        LCM *= A[i]

    if flag:
        print("pairwise coprime")
    else:
        print("setwise coprime")

if __name__ == "__main__":
    main()