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 max = 0;
            for (var i = 0; i < aList.Length; ++i)
            {
                max = Math.Max(max, aList[i]);
            }
            var allDic = new Dictionary<long, long>();
            var minPDivList = GetMinPDivList(max);
            foreach (var a in aList)
            {
                var pDiv = PDiv(a, minPDivList, 2);
                var prev = 0;
                foreach (var div in pDiv)
                {
                    if (div == 1 || div == prev)
                    {
                        continue;
                    }
                    if (allDic.ContainsKey(div))
                    {
                        return false;
                    }
                    allDic.Add(div, 1);
                    prev = div;
                }
            }
            return true;
        }
        // 最小の素因数リストを求める
        static int[] GetMinPDivList(int max)
        {
            var minPDivList = new int[max + 1];
            for (var i = 0; i <= max; ++i)
            {
                minPDivList[i] = i;
            }

            for (var i = 2; i * i <= max; ++i)
            {
                if (minPDivList[i] == i)
                {
                    for (var j = i * i; j <= max; j += i)
                    {
                        if (minPDivList[j] == j)
                        {
                            minPDivList[j] = i;
                        }
                    }
                }
            }
            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 List<int> PDiv(int n, int[] minPDivList, int min)
        {
            var p = minPDivList[n];
            if (n == p)
            {
                var dic = new List<int>();
                dic.Add(p);
                return dic;
            }
            else
            {
                var dic = PDiv(n / p, minPDivList, p);
                dic.Add(p);
                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);
        }
    }
}


Measured memory_bytes: 113256