using static System.Math;
using System.Collections.Generic;
using System;

public class Hello
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        var d = new Dictionary<int, int>();
        for (int i = 0; i < n; i++) calc(d, a[i]);
        check(n, d);
    }
    static void check (int n,  Dictionary<int,int>d)
    {
        var dmax = 0;
        foreach (var x in d) dmax = Max(dmax, x.Value);
        string ans;
        if (dmax == 1) ans = "pairwise coprime";
        else if (dmax == n) ans = "not coprime";
        else ans = "setwise coprime";
        Console.WriteLine(ans);
    }
    static void calc (Dictionary<int,int>d, int a)
    {
        for (int i = 2; i * i <= a; i++)
        {
            if (a % i == 0  )
            {
                if (d.ContainsKey(i)) d[i]++;
                else d[i] = 1;
                if (a != i * i)
                {
                    if (d.ContainsKey(a / i)) d[a / i]++;
                    else d[a / i] = 1;
                }
            }
        }
        if (d.ContainsKey(a)) d[a]++;
        else d[a] = 1;
   }
}
