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

int n;
int a[N];
set<int> p[N + 101];
bool prime[N + 101];

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 + 100; i++)
        prime[i] = 1;
    
    for (long long i = 2; i * i <= N + 100; i++)
    {
        if (prime[i])
        {
            for (int j = 2 * i; j <= N + 100; j += i)
            {
                p[j].insert(i);
                prime[j] = 0;
            }
        }
    }
    
    for (int i = 2; i <= N + 100; i++)
    {
        if (prime[i] && p[i].size() == 0)
            p[i].insert(i);
    }
    
    set<int> s;
    int sz = 0;
    for (int i = 0; i < n; i++)
    {
        for (auto x : p[a[i]])
        {
            s.insert(x);
            sz++;
        }
    }
    
    if (sz != (int)s.size())
    {
        if (g == 1)
            cout << "setwise coprime";
        else
            cout << "not coprime";
    }
    else
        cout << "pairwise coprime";
    
    return 0;
}
