/************************************
/ AUTHOR : YATHARTH GOSWAMI         /  
/ ALIAS : hacker_yg                 /
/ INSTITUTE : IIT Kanpur            /
************************************/
//          TEMPLATE                //

#include <bits/stdc++.h>

#define ll long long
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define PI 3.14159265359

using namespace std;

/*ll powMod(ll a, ll y)
{
    ll ans = 1;
    
    while (y > 0) 
    { 
        if (y & 1) 
            ans = (ans*a) % MOD; 
  
        y = y>>1;
        a = (a*a) % MOD; 
    } 
    return ans;
}*/

/*ll modInv(ll a)
{
    return powMod(a, MOD-2);	
}*/

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    const int N = 1e6 + 5;
    int n;
    cin >> n;
    vector <int> v(n);
    vector <vector <int> > div(N);
    map <int, int> m;
    vector <int> visited(N, 0);
    for (int i = 0; i < n; i++) cin >> v[i];
    ll lcm = v[0], p = v[0];
    for (int i = 1; i < n; i++) {
        lcm = (lcm*(v[i]))/(__gcd(lcm, (ll)v[i]));
        p *= v[i];
    }
    if (lcm != p) {
        int gcd = v[0];
        for (int i = 1; i < n; i++) {
            gcd = __gcd(gcd, v[i]);
        }
        if (gcd == 1) cout << "setwise coprime" << endl;
        else cout << "not coprime" << endl;
    }
    else cout << "pairwise coprime" << endl;
    return 0;
}

    
