using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;
 
namespace contest_Csharp
{
 
    class Program
    {
        public static (long m, long s)[,] dp;
        public static long mod;
        
        public static List<int> getprimes(int n)
        {
            var result = new List<int>();
            result.Add(2);
            int i = 3;
            while (result.Last() <= n)
            {
                var flg = true;
                foreach(var p in result)
                {
                    if (i % p == 0)
                    {
                        flg = false;
                    } 
                }
                if (flg)
                    result.Add(i);
                i = i + 2;
            }
            return result;
        }
        static void Main(string[] args)
        {
            checked
            {
                var sw = new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
                Console.SetOut(sw);
 
                var vals = Console.ReadLine().Split(' ').
                    Select(x => int.Parse(x)).ToList();
 
 
                var N = vals[0];
                //var M = vals[1];
                //var S = vals[2];
                var A = Console.ReadLine().Split(' ').
                    Select(x => int.Parse(x)).ToList();
 
                var ans = "";
 
 
                var primes = getprimes(1000);
                var usedprime = new bool[1050];
 
                var pairflg = true;
                A.Sort();
                var nokori = new List<int>();
 
                
                for (int i = 0; i < N; i++)
                {
                    var num = A[i];
                    foreach(var p in primes)
                    {
                        
                        if (num % p == 0)
                        {
                            if (usedprime[p] && num==A[i])
                            {
                                pairflg = false;
                                
                            }
                            else
                                usedprime[p] = true;
                            num /= p;
                        }
                    }
                    if (num > 1)
                    {
                        nokori.Add(num);
                    }
                }
                nokori.Sort();
                for (int i = 1; i < nokori.Count(); i++)
                {
                    if (nokori[i] == nokori[i - 1])
                        pairflg = false;
                }
                if (pairflg)
                {
                    ans = "pairwise coprime";
                }
                else
                {
                    
                    var G = A[0];
                    for (int i = 1; i < N; i++)
                    {
                        G = (int)gcd(G, A[i]);
                    }
                    ans = (G == 1) ? "setwise coprime" : "not coprime";
                }
                
 
                
                
                Console.WriteLine(ans);
 
                Console.Out.Flush();
            }//cheked
 
 
 
 
        }
        static long gcd(long a, long b)
        {
            long large = Math.Max(a, b);
            long small = Math.Min(a, b);
            while (large % small != 0)
            {
                var S = small;
                small = large % small;
                large = S;
            }
            return small;
        }
    }
 
}

Measured memory_bytes: 112812