import math
import collections
def main():

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


    def prime_factor(n):
        ans = []
        if n % 2 == 0: ans.append(2)
        while n % 2 == 0:
            n //= 2

        for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                ans.append(i)
            while n % i == 0:
                n //= i
        if n > 0:
            ans.append(n)
        return ans

    ispair = True
    isset = True

    d = dict()
    for v in A:
        for u in prime_factor(v):
            d[u] = d.get(u, 0) + 1
    # print(d)

    if any(d[p] > 1 for p in d):
        ispair = False
    if any(d[p] == N for p in d):
        isset = False

    if ispair:
        return "pairwise coprime"
    if isset:
        return "setwise coprime"

    return "not coprime"

if __name__ == '__main__':
    print(main())
