using System;
using System.Collections.Generic;
using System.Linq;

namespace E
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = Int32.Parse(Console.ReadLine());
            var a = Console.ReadLine().Split(" ").Select(s => Int32.Parse(s)).ToList();

            var p = new List<List<int>>();
            var values = new Dictionary<int, int>();
            foreach (var val in a)
            {
                p.Add(new List<int>());
                var facts = PrimeFactors(val);
                foreach (var hoge in facts.Distinct())
                {
                    if(!values.ContainsKey(hoge)) values[hoge] = 0;
                    values[hoge]++;
                    p.Last().Add(hoge);
                }
            }

            bool flag1 = true;
            foreach(var v in values){
                if(v.Key == 1) continue;
                if(v.Value > 1) {
                    flag1 = false;
                    break;
                }
            }
            if(flag1) {
                Console.WriteLine("pairwise coprime");
                return;
            }
            var f2 = true;
            foreach(var v in values){
                if(v.Value >= n) {
                    f2 = false; 
                    break;
                }
            }
            if(f2) {
                Console.WriteLine("setwise coprime");
                return;
            }
            Console.WriteLine("not coprime");
        }
        public static IEnumerable<int> PrimeFactors(int n)
        {
            int i = 2;
            int tmp = n;

            while (i * i <= n) //※1
            {
                if (tmp % i == 0)
                {
                    tmp /= i;
                    yield return i;
                }
                else
                {
                    i++;
                }
            }
            if (tmp != 1)yield return tmp; //最後の素数も返す
        }

        public static int Gcd(int a, int b)
        {
            if (a < b)
                // 引数を入替えて自分を呼び出す
                return Gcd(b, a);
            while (b != 0)
            {
                var remainder = a % b;
                a = b;
                b = remainder;
            }
            return a;
        }
    }
}