#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
typedef long long int ll;
typedef long double ld;
#define rep(i,n) for (ll i = 0; i < (n); ++i)
const ll mod = 1e9+7;
const ll INF = 1e18;
#define All(a) (a).begin(),(a).end()
#define Pi acos(-1)

bool isPrime(int x) {
  int i;
  if(x < 2)return 0;
  else if(x == 2) return 1;
  if(x%2 == 0) return 0;
  for(i = 3; i*i <= x; i += 2) if(x%i == 0) return 0;
  return 1;
}

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << setprecision(15) << fixed;
  chrono::system_clock::time_point start,end;
  start = chrono::system_clock::now();

  ll n;
  cin >> n;
  vector<ll> a(n);
  rep(i,n) cin >> a[i];
  ll cnt = 0;
  sort(All(a));
  rep(i,n-1) {
    if (a[i] == a[i+1]) goto ww;
  }

  for(ll j = 2; j*j <= 1000000; ++j) {
    if(isPrime(j)) {
      rep(i,n) {
        if (a[i]%j == 0) ++cnt;
      }
    }
    if (cnt >= 2) goto ww;
    else {
      cnt = 0;
    }
  }
  cout << "pairwise coprime\n";
  return 0;

  ww:
  ll t = a[0];
  rep(i,n) {
    t = gcd(t,a[i]);
  }
  if (t == 1) {
    cout << "setwise coprime\n";
    return 0;
  }
  cout << "not coprime\n";

  end = chrono::system_clock::now();
  auto elapsed = chrono::duration_cast< chrono::milliseconds >(end - start).count();
  cerr << elapsed << "ms" << '\n';
}
