#include <bits/stdc++.h>
using namespace std;

#define ll long long

template<typename T> void drop(const T &x){cout<<x<<'\n';exit(0);}

void solve() {
  int n; cin >> n;
  vector<int> count(1e6);
  int all = 0;
  for(int i=0; i<n; ++i) {
    int a; cin >> a;
    count.at(a)++;
    all = __gcd(all, a);
  }
  bool ok = true;
  for(int i=2; i<n && ok; ++i) {
    int sum = 0;
    for(int j=i; j<n; j+=i) sum += count[j];
    if(sum > 1) ok = false;
  }
  cout << (ok ? "pairwise coprime" : all == 1 ? "setwise coprime" : "not coprime") << '\n';
}

signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int T=1;
  //cin >> T;
  while(T--) solve();

  return 0;
}
