check_list = [0]*1000010
conf = False

def make_divisors(n):
    divisors = []
    global conf
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if check_list[i] >= 1:
                conf = True
                check_list[i] += 1
            elif check_list[i] == 0 and i != 1:
                check_list[i] = 1
            if i != n // i:
                divisors.append(n//i)
                if check_list[n//i] >= 1:
                    conf = True
                    check_list[i] += 1
                elif check_list[n//i] == 0 and n//i != 1:
                    check_list[n//i] = 1
    # divisors.sort()
    return divisors[1:]

def main():
    N = int(input())
    A = list(map(int, input().split()))
    for i in range(len(A)):
        make_divisors(A[i])
    if max(check_list) == len(A):
        return "not coprime"
    else:
        if conf:
            return "setwise coprime"
        else:
            return "pairwise coprime"

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