#include <bits/stdc++.h>
 
using namespace std;
 
const int N = 1000000;

int n;
int a[N];
vector<int> p[N + 1];
bool prime[N + 1] = {};

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    cin >> n;
    
    cin >> a[0];
    int g = a[0];
    for (int i = 1; i < n; i++)
    {
        cin >> a[i];
        g = __gcd(g, a[i]);
    }
    
    prime[0] = prime[1] = 0;
    for (int i = 2; i <= N; i++)
        prime[i] = 1;
    
    int i = 2;
    for (; i * i <= N; i++)
    {
        if (prime[i])
        {
            for (int j = i; j <= N; j += i)
                p[j].push_back(i);
        }
    }
    
    for (; i <= N; i++)
    {
        if (prime[i])
            p[i].push_back(i);
    }
    
    set<int> s;
    int sz = 0;
    for (i = 0; i < n && s.size() == sz; i++)
    {
        for (auto x : p[a[i]])
        {
            s.insert(x);
            sz++;
        }
    }
    
    if (sz != s.size())
    {
        if (g == 1)
            cout << "setwise coprime";
        else
            cout << "not coprime";
    }
    else
        cout << "pairwise coprime";
    
    return 0;
}
