# -*- coding: utf-8 -*-
import sys


def main():
    N = int( sys.stdin.readline() )
    A_list = list(map(int, sys.stdin.readline().split()))


    def get_factor(n :int) -> set:
        ans = set()
        
        for i in range(2, int(n**(1/2)+1) ):  # exclude "factor 1" and "max factor"
            if  n % i == 0:
                ans.add(i)
                
                d = n / i
                if (d != i) and (d % 1 == 0):
                    ans.add( int(d) )
        
        ans.add(n)  # include "max factor"
        return ans

    # ----------
    factor = [None] * N

    for i in range(N):
        factor[i] = get_factor( A_list[i] )
    
    # ----------
    for i in range(1, N):
        check = factor[i] & factor[i-1]

        if check:
            break
    
    else:
        print("pairwise coprime")
        return

    # ----------
    common = set( factor[0] )

    for i in range(1, N):
        common &= factor[i]

    if (not common):
        print("setwise coprime")
        return
    
    # ----------
    print("not coprime")
    return


if __name__ == "__main__":
    main()
