import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
def main():
    n = int(input())
    a = [int(t) - 1 for t in input().split()]
    b = [1] * (n + 1)
    for i in range(n, 1, -1):
        b[i - 1] = lcm(b[i], a[i - 1])
    flag = 1
    for i in range(n - 1):
        if math.gcd(a[i], b[i + 1]) != 1:
            flag = 0
            break
    g = a[0]
    for i in range(n):
        g = math.gcd(g, a[i])
    if flag == 0:
        if g == 1:
            flag = 2
    ans = "not coprime"
    if flag == 1:
        ans = "pairwise coprime"
    elif flag == 2:
        ans = "setwise coprime"
    print(ans)
main()