using System;
using System.Linq;
using System.Numerics;
using System.Collections.Generic;
using System.IO;
using System.Text;
using N = System.Int64;

static class Program
{
    static public void Main(string[] args)
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        var solver = new Solver();
        solver.Solve();
        Console.Out.Flush();
    }
}

public class Solver
{
    public void Solve()
    {
        N n = rn;
        var a = new List<N>();
        for (int i = 0; i < n; i++) { a.Add(rn); }
        N r = 0;//0:pairwise 1:setwise 2:not
        N m = a.Max();
        if (Gcd(a.ToArray()) > 1) { r = 2; }
        else
        {
            var prime = new List<N>();
            var div = new N[m + 1];
            if (n >= 2) { prime.Add(2); for (int i = 2; i <= m; i += 2) { div[i] = 2; } }
            for (N p = 3; p <= m; p += 2) { if (div[p] == 0) { prime.Add(p); div[p] = p; for (N q = p * p; q <= m; q += 2 * p) { if (div[q] == 0) { div[q] = p; } } } }
            var flag = new N[m + 1];
            for (int i = 0; i <= m; i++) { flag[i] = -1; }
            for (int i = 0; i < n; i++)
            {
                while (a[i] > 1)
                {
                    if (flag[div[a[i]]] > -1 && flag[div[a[i]]] < i)
                    {
                        r = 1;
                        break;
                    }
                    flag[div[a[i]]] = i;
                    a[i] /= div[a[i]];
                }
                if (r == 1) break;
            }
        }

        switch (r)
        {
            case 0:
                Write("pairwise coprime");
                break;
            case 1:
                Write("setwise coprime");
                break;
            case 2:
                Write("not coprime");
                break;
        }
    }

    N Gcd(params N[] n) { N p = n[0]; for (N i = 1; i < n.Length; i++) { p = Gcd(p, n[i]); } return p; }
    N Gcd(N a, N b) { return (a == 0) ? b : Gcd(b % a, a); }

    N rn { get { return sc.Integer(); } }
    double rd { get { return sc.Double(); } }
    string rs { get { return sc.Scan(); } }
    public StreamScanner sc = new StreamScanner(Console.OpenStandardInput());

    void Write<T>(T t) { Console.WriteLine(t.ToString()); }
    void YN(bool t) { Console.WriteLine(t ? "YES" : "NO"); }
    void Yn(bool t) { Console.WriteLine(t ? "Yes" : "No"); }
    void yn(bool t) { Console.WriteLine(t ? "yes" : "no"); }
}



public class StreamScanner
{
    public StreamScanner(Stream stream) { str = stream; }
    private readonly Stream str;
    private readonly byte[] buf = new byte[1024];
    private int len, ptr;
    public bool isEof = false;
    public bool IsEndOfStream { get { return isEof; } }
    private byte read()
    {
        if (isEof) throw new EndOfStreamException();
        if (ptr >= len)
        {
            ptr = 0;
            if ((len = str.Read(buf, 0, 1024)) <= 0)
            {
                isEof = true;
                return 0;
            }
        }
        return buf[ptr++];
    }
    public char Char()
    {
        byte b = 0;
        do b = read();
        while (b < 33 || 126 < b);
        return (char)b;
    }
    public string Scan()
    {
        var sb = new StringBuilder();
        for (var b = Char(); b >= 33 && b <= 126; b = (char)read())
            sb.Append(b);
        return sb.ToString();
    }
    public N Integer()
    {
        N ret = 0; byte b = 0; var ng = false;
        do b = read();
        while (b != '-' && (b < '0' || '9' < b));
        if (b == '-') { ng = true; b = read(); }
        for (; true; b = read())
        {
            if (b < '0' || '9' < b)
                return ng ? -ret : ret;
            else ret = ret * 10 + b - '0';
        }
    }
    public double Double() { return double.Parse(Scan()); }
}


Measured memory_bytes: 57800