#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
const int mod = 1e9 + 7;
long long a[maxn];
int mp[maxn];
int vis[maxn];
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  long long t = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    t = gcd(t, a[i]);
  }
  vector<int> cnt;
  for (int i = 2; i < maxn; i++) {
    if (vis[i]) continue;
    cnt.push_back(i);
    for (int j = i; j < maxn; j += i) {
      vis[j] = 1;
    }
  }
  if (t == 1) {
    for (int i = 1; i <= n; i++) {
      for (auto &v : cnt) {
        if (a[i] % v == 0) {
          mp[v]++;
          if (mp[v] > 1) {
            cout << "setwise coprime" << '\n';
            return 0;
          }
          while (a[i] % v == 0) a[i] /= v;
        }
      }
    }
    cout << "pairwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
}
