using System;
using static System.Console;
using static System.Math;
using System.Numerics;
using System.Collections.Generic;
using System.Linq;


namespace AtCoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var n = myRead.readInt();
            var a = myRead.readIntArray();
            bool b = true;
            var ans = "pairwise coprime";
            for (int i = 0; i < n - 1; i++)
            {
                for (int j = i + 1; j < n; j++)
                {
                    if ((int)MyMath.Gcd(a[i], a[j]) != 1)
                    {
                        b = false;
                        break;
                    }
                }
            }
            if (b == false)
            {
                int v = a[0];
                for (int i = 1; i < n; i++)
                {
                    v = (int)MyMath.Gcd(v, a[i]);
                    if (v == 1)
                    {
                        ans = "setwise coprime";
                        break;
                    }
                }
            }
            ans = (ans == "setwise coprime" || b == true) ? ans : "not coprime";
            WriteLine(ans);
        }
    }
    public static class myRead
    {
        public static int readInt() { return int.Parse(ReadLine()); }
        public static long readLong() { return long.Parse(ReadLine()); }
        public static string readStr() { return ReadLine(); }
        public static int[] readIntArray() { return ReadLine().Split(' ').Select(int.Parse).ToArray(); }
        public static long[] readLongArray() { return ReadLine().Split(' ').Select(long.Parse).ToArray(); }
        public static string[] readStrArray() { return ReadLine().Split(' '); }
    }


    public static class MyMath
    {
        public static long Factorical(long n)
        { return n <= 1 ? 1L : n * Factorical(n - 1); }
        public static long Permutation(long n, long m)
        { return m == 0 ? 1L : (m == n) ? Permutation(n, m - 1) : n * Permutation(n - 1, m - 1); }
        public static long Combination(long n, long m)
        { return n - m > m ? Permutation(n, m) / Factorical(m) : Permutation(n, n - m) / Factorical(n - m); }
        public static long Gcd(long n, long m)
        { return n % m == 0 ? m : Gcd(m, n % m); }
        public static long Lcm(long n, long m)
        { return n * m / Gcd(n, m); }
        public static long Pow(long n, long m)
        { return m == 0 ? 1L : m == 1 ? n : n * Pow(n, m - 1); }
    }


}