#include <iostream>
#include <algorithm>
using namespace std;

int main(){
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];

    bool p = true;
    for (int i = 0; i < n-1; i++)
    {
        for (int j = i+1; j < n; j++)
        {
            if(__gcd(a[i], a[j])!=1) {
                p = false;
                break;
            }
        }
        if(!p) break;
    }
    
    int m = a[0];
    for (int i = 1; i < n; i++)
    {
        m = __gcd(m, a[i]);
    }
    

    if(p) {
        cout << "pairwise coprime" << endl;
    } else if (m==1) {
        cout << "setwise coprime" << endl;
    } else{
        cout << "not coprime" << endl;
    }
}