using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
class e{
    public static void Main(){
        int size = int.Parse(Console.ReadLine());
        int[] n = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
        int max = n.Max();
        int[] c = new int[max+1];
        for(int i=0; i<size; i++){
            var ps = CreatePrimeFactors(n[i]).Distinct().ToList();
            //Console.WriteLine(string.Join(" ",ps));
            foreach(var num in ps){
                c[num]++;
            }
        }
        //Console.WriteLine(string.Join(" ",c));
        int maxnum = c.Max();
        string ans = "";
        if(maxnum == 1){
            ans = "pairwise coprime";
        }
        else if(maxnum == size){
            ans = "not coprime";
        }
        else{
            ans = "setwise coprime";
        }
        Console.WriteLine(ans);
    }
    public static List<int> CreatePrimeFactors(int n){
        List<int> ret = new List<int>();
        IEnumerable<int> primenums = DevidePrimeNums(n);
        foreach(int i in primenums){
            ret.Add(i);
        }
        if(ret.Count == 0){
            ret.Add(1);
        }
        return ret;
    }
    public static IEnumerable<int> DevidePrimeNums(int n){
        int temp = n;
        int i = 2;
        while(i*i <= n){
            if(temp % i == 0){
                temp /= i;
                yield return i;
            }
            else{
                i++;
            }
        }
        if(temp != 1){
            yield return temp;
        }
    }
}
