#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define pii pair <int, int>
#define F first
#define S second
#define ll long long
#define io ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define M_PI 3.14159265358979323846
const int N = 200005;
const int mod = 1e9 + 7;
int main() {
    io;
    int n, a[N];
    cin >> n;
    int g;
    for(int i = 0; i < n; i++){
        cin >> a[i];
        if(!i) g = a[i];
        else g = __gcd(g, a[i]);
    }
    if(g != 1) {
        cout << "not coprime" << endl;
        return 0;
    }
    map <int, int> mp;
    for(int i = 0; i < n; i++){
        for(int j = 2; j * j <= a[i]; j++){
            if(a[i] % j == 0){
                if(mp[j]){
                    cout << "setwise coprime";
                    return 0;
                }
                mp[j]++;
                while(a[i] % j == 0) a[i] /= j;
            }
        }
        if(a[i] != 1){
            if(mp[a[i]]){
                cout << "setwise coprime";
                return 0;
            }
            mp[a[i]]++;
        }
    }
    cout << "pairwise coprime";
}
