#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, t, i, j, x, k;
  cin >> n;
  long long b[1000001] = {0};
  for (i = 2; i * i < 1000001; i++) {
    if (b[i] == 0) {
      for (j = i * i; j < 1000001; j += i) b[j] = 1;
    }
  }
  vector<long long> pr, v(1000001, 0);
  for (i = 2; i < 1000001; i++)
    if (b[i] == 0) pr.push_back(i);
  long long a[n];
  for (i = 0; i < n; i++) cin >> a[i];
  long long ans = gcd(a[0], a[1]);
  for (i = 2; i < n; i++) ans = gcd(ans, a[i]);
  if (ans > 1)
    cout << "not coprime";
  else {
    x = 1;
    for (i = 0; i < n; i++) {
      for (j = 0; j < pr.size(); j++) {
        if (a[i] % pr[j] == 0) {
          v[pr[j]]++;
          if (v[pr[j]] > 1) x = -1;
        }
        if (x == -1) {
          cout << "setwise coprime";
          exit(0);
        }
        while (a[i] % pr[j] == 0) a[i] /= pr[j];
        if (a[i] == 1) break;
      }
    }
    cout << "pairwise coprime";
  }
  return 0;
}
