import sys
import math
input = sys.stdin.readline

def main():
    n = int(input())
    a = list(map(int, input().split()))
    
    sc = False
    key = a[0]
    for i in range(1, n):
        key = math.gcd(key, a[i])
    
    if key == 1:
        sc = True
    
    key = a[0]
    pc = True
    for i in range(1, n):
        if math.gcd(key, a[i]) > 1:
            pc = False
            break
        key *= a[i]
    
    if pc:
        print("pairwise coprime")
    elif sc:
        print("setwise coprime")
    else:
        print("not coprime")
        
    
    
    
    
if __name__ == "__main__":
    main()
