from math import gcd
from functools import reduce


def lcm(a, b):
    return (a*b)//gcd(a, b)


def solve():
    n = int(input())
    arr = list(map(int, input().split()))
    arr_prod = reduce((lambda x, y: x*y), arr)
    total_gcd = gcd(arr[0], arr[1])
    total_lcm = lcm(arr[0], arr[1])
    for i in range(2, n):
        total_gcd = gcd(total_gcd, arr[i])
        total_lcm = lcm(total_lcm, arr[i])
    if total_lcm == arr_prod:
        print("pairwise coprime")
    elif total_lcm != arr_prod and total_gcd == 1:
        print("setwise coprime")
    else:
        print("not coprime")


def main():
    t = 1
    while t > 0:
        solve()
        t -= 1


main()