#include<bits/stdc++.h>
using namespace std;
#define fo(i,a,n) for(i=a;i<n;i++)
#define ll long long
#define deb(x) cout << #x << "=" << x << endl
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define sortrev(x) sort(all(x),greater<int>())
#define pi 3.1415926535897932384626

typedef pair<int,int> pii;
typedef pair<ll, ll> pl;
typedef vector<int>	vi;
typedef vector<bool> vb;
typedef vector<ll>	vl;
typedef vector<pii>	vpii;
typedef vector<pl>	vpl;
typedef vector<vi>	vvi;
typedef vector<vl>	vvl;
typedef vector<double> vd;


const int mod = 1000000007;
const int inf = 1000000000;
const int N = 2000007, M = N;
ll i,j,cnt,par;
vi vec[N];



void solve() {
  ll n;
  cin>>n;

  ll x, m = INT_MIN , g = 0 , p = 0;
  map<int,int>mp;

  ll cnt = 0;
  for(int i=0;i<n;i++) {
    cin>>x ;
    mp[x]++ ;
    m = max(m , x) ;
    g = __gcd(g , x);
    if(x%2 == 0) cnt++;

  }


  if(g != 1) {
    cout<<"not coprime\n";
    return;
  }
  if(cnt > 1) {
    cout<<"setwise coprime\n";
    return;
  }
  bool f = 0;

  for(int i=3;i<=m;i++) {
    cnt+=mp[i];
    for(int j=2*i;j<=m;j+=i) {
        if(mp[j]) cnt++;
        if(cnt>=2) {
            f = 1;
            break;
        }
    }
    if(f) break;
  }

  if(f) cout<<"setwise coprime\n";
  else cout<<"pairwise coprime\n";
}


int main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);

    int t = 1;
    //cin >> t;
    while(t--) {
        solve();
    }

    return 0;
}


