#include <bits/stdc++.h>

using namespace std;

#define ll unsigned long long
#define endl "\n"
#define MOD 1000000007

void solve(){
  ll n;
  cin >> n;
  ll a[n], sum=0, ans=0;
  for(ll i=0;i<n;i++)
    cin >> a[i];
  ll gcdchk=a[0], pr=1;
  for(ll i=1;i<n;i++){
    gcdchk=__gcd(gcdchk,a[i]);
      if(gcdchk==1){
        cout << "setwise coprime\n";
        return;
      }
      if(gcdchk!=1){
        cout << "not coprime\n";
        return;
      }
   }
  cout << "pairwise coprime\n";
 }  

int main(){
  solve();
  return 0;
}

