#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long a[n];
  bool f[1000001] = {0};
  bool vis[1000001] = {0};
  long long gc = 0;
  bool hmo = false;
  for (long long& x : a) {
    cin >> x;
    if (!f[x])
      f[x] = true;
    else if (x > 1)
      hmo = true;
    gc = gcd(gc, x);
  }
  for (long long i = 2; i < 1000001; i++) {
    if (vis[i]) continue;
    long long cnt = 0;
    for (long long j = 2 * i; j < 1000001; j += i) {
      vis[j] = true;
      if (f[j]) cnt++;
    }
    if (cnt >= 2 || hmo) {
      if (gc == 1) {
        cout << "setwise coprime" << '\n';
        return 0;
      } else {
        cout << "not coprime" << '\n';
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << '\n';
  return 0;
}
