using static System.Math;
using System;

public class Hello
{
    public static int dmax;
    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 int[1000001];
        for (int i = 0; i < n; i++) calc(n, d, a[i]);
        check(n, d[1]);
    }
    static void check(int n, int d1)
    {
        string ans;
        if (dmax == 1) ans = "pairwise coprime";
        else if (dmax == n)
        {
            if (d1 == n) ans = "pairwise coprime";
            else ans = "not coprime";
        }
        else ans = "setwise coprime";
        Console.WriteLine(ans);
    }
    static void calc(int n, int[] d, int a)
    {
        dmax = 0;
        for (int i = 2; i * i <= a; i++)
        {
            if (a % i == 0)
            {
                d[i]++;
                dmax = Max(dmax, d[i]);
                if (a != i * i)
                {
                    d[a / i]++;
                    dmax = Max(dmax, d[a / i]);
                }
            }
        }
        d[a]++;
        dmax = Max(dmax, d[a]);
    }
}
