import sys
from math import gcd

input = sys.stdin.readline


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


def main():
    N = int(input())
    A = list(map(int, input().split()))

    all_lcm = 1
    all_prodict = 1
    for a in A:
        all_lcm = lcm(all_lcm, a)
        all_prodict *= a

    all_gcd = A[0]
    for a in A[1:]:
        all_gcd = gcd(all_gcd, a)

    if all_gcd == 1:
        if all_lcm == all_prodict:
            ans = "pairwise coprime"
        else:
            ans = "setwise coprime"
    else:
        ans = "not coprime"
    print(ans)


if __name__ == "__main__":
    main()
