using System;
using static System.Console;
using System.Collections.Generic;

namespace abc177
{
    class Program
    {
        static void Main()
        {
            var n = int.Parse(ReadLine());
            var aList = ReadNumList();
 
            WriteLine(PrimeKind(aList));
        }
        static int[] ReadNumList()
        {
            var line = Console.ReadLine().Split(' ');
            if (line.Length == 1 && string.IsNullOrEmpty(line[0]))
            {
                return new int[0];
            }
            var numList = new int[line.Length];
            for (var i = 0; i < line.Length; ++i)
            {
                numList[i] = int.Parse(line[i]);
            }
            return numList;
        }
        static string PrimeKind(int[] aList)
        {
            if (IsPairwise(aList))
            {
                return "pairwise coprime";
            }
            else
            {
                var allGcd = aList[0];
                for (var i = 1; i < aList.Length; ++i)
                {
                    allGcd = GetGCD(allGcd, aList[i]);
                    if (allGcd == 1)
                    {
                        break;
                    }
                }
                return allGcd == 1 ? "setwise coprime" : "not coprime";
            }
        }
        static bool IsPairwise(int[] aList)
        {
            var allDic = new Dictionary<long, long>();
            var minPDivList = GetMinPDivList(aList);
            foreach (var a in aList)
            {
                var pDiv = PDiv(a, minPDivList, 2);
                foreach (var div in pDiv)
                {
                    if (allDic.ContainsKey(div.Key))
                    {
                        return false;
                    }
                    allDic.Add(div.Key, div.Value);
                }
            }
            return true;
        }
        // 最小の素因数リストを求める
        static int[] GetMinPDivList(int[] nList)
        {
            var max = 0;
            foreach (var n in nList)
            {
                max = Math.Max(max, n);
            }
            var minPDivList = new int[max + 1];
            var list = new List<int>(nList);
            var i = 2;
            for (var k = nList.Length - 1; k >= 0; --k)
            {
                if (list[k] % i == 0)
                {
                    minPDivList[list[k]] = i;
                    list.RemoveAt(k);
                }
            }
            for (i = 3; i <= max; i += 2)
            {
                var len = list.Count;
                for (var k = len - 1; k >= 0; --k)
                {
                    if (list[k] % i == 0)
                    {
                        minPDivList[list[k]] = i;
                        list.RemoveAt(k);
                    }
                }
            }
            return minPDivList;
        }
        static int GetMinPDiv(int n, int min)
        {
            var p = min;
            while ((long)p * p <= n)
            {
                if (n % p == 0)
                {
                    return p;
                }
                ++p;
            }
            return n;
        }
        static Dictionary<int, int> PDiv(int n, int[] minPDivList, int min)
        {
            if (minPDivList[n] == 0)
            {
                minPDivList[n] = GetMinPDiv(n, min);
            }
            var p = minPDivList[n];
            if (n == p)
            {
                var dic = new Dictionary<int, int>();
                dic.Add(p, 1);
                return dic;
            }
            else
            {
                var dic = PDiv(n / p, minPDivList, p);
                if (dic.ContainsKey(p))
                {
                    ++dic[p];
                }
                else
                {
                    dic.Add(p, 1);
                }
                return dic;
            }
        }
        static int GetGCD(int a, int b)
        {
            if (a < b)
            {
                var tmp = a;
                a = b;
                b = tmp;
            }
            var div = a % b;
            if (div == 0)
            {
                return b;
            }
            return GetGCD(b, div);
        }
    }
}
