#include <bits/stdc++.h>
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
using namespace std;
long long solve() {
  long long n;
  cin >> n;
  long long a[n];
  long long hcf = 0;
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  for (long long i = 0; i < 1000002; i++) {
    if (mp[i]) hcf = gcd(hcf, i);
  }
  if (hcf > 1) {
    cout << "not coprime";
    return 0;
  }
  for (long long i = 2; i < 1000; i++) {
    long long cnt = 0;
    for (long long j = i; j < 1000002; j += i) {
      if (mp[j]) cnt++;
      if (cnt > 1) {
        cout << "setwise coprime";
        return 0;
      }
    }
    if (cnt > 1) {
      cout << "setwise coprime";
      return 0;
    }
  }
  cout << "pairwise coprime";
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  solve();
}
