'''
Contest 177 - Task E


'''
import functools
import math

def setwise(nums):
    return functools.reduce(lambda a,b: math.gcd(a,b), nums)


def compute(nums):
    gcds = []
    size = len(nums)
    for i in range(size):
        for j in range(i+1, size):
            # print(f"i: {i} and j: {j}")
            gcds.append(math.gcd(nums[i], nums[j]))

    # print(gcds)
    if all(map(lambda n: n==1, gcds)):
        print("pairwise coprime")
    elif setwise(gcds) == 1:
        print("setwise coprime")
    else:
        print("not coprime")

if __name__ == "__main__":
    num = int(input())
    nums = list(map(int, input().split(" ")))
    compute(nums)