#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,b,a) for(int i=b;i>=a;i--)
#define fori(a) for(auto i : a )
#define all(a) begin(a), end(a)
#define set(a,b) memset(a,b,sizeof(a))
#define sz(a) a.size()
// #define pi 3.14159
#define ll long long
#define ull unsigned long long
#define pb push_back
#define PF push_front //deque
#define mp make_pair
#define pq priority_queue
#define mod 1000000007
#define f first
#define s second
#define pii pair<int,int>
// #define pii pair< int, pi >
#define vi vector<int>
#define vpii vector<pii>
#define debug(v) for(auto i:v) cout<<i<<" ";
#define tc int t; cin >> t; while(t--)

using namespace std;
using namespace std::chrono;

string repeat(string s, int n) {
    string s1 = "";
    for (int i=0; i<n;i++)
        s1+=s;
    return s1;
}
string getString(char x) {
    string s(1, x);
    return s;
}

void optimizeIO(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
int gcd(int a, int b){
    if (a == 0)  return b;
    return gcd(b % a, a);
}
void solve(){
  int n;
  cin>>n;
  int a[n];

  rep(i,0,n) cin>>a[i];
  int gcdglobal=a[0];
  rep(i,1,n) gcdglobal=__gcd(gcdglobal,a[i]);
  map<int,int> m1;
  rep(i,0,n){
    rep(j,2,sqrt(n)+1){
      int c=0;
      while(a[i]%j==0){
        c++;
        a[i]/=j;
      }
      if(c>0) m1[j]++;
    }
  }
  int mx=0;
  for(auto i:m1) mx=max(mx,i.second);

  if(mx==1){
    cout<<"pairwise coprime\n";
  }
  else if(gcdglobal==1){
    cout<<"setwise coprime\n";
  }
  else cout<<"not coprime\n";
}
int main(){
    optimizeIO();
    // tc
    { solve();
    }
}
