#include <bits/stdc++.h>
using namespace std;
int power(long long int x, long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000000;
    y = y >> 1;
    x = (x * x) % 1000000000;
  }
  return res;
}
int gcd(int a, int b) {
  if (!a) return b;
  return gcd(b % a, a);
}
void solve() {
  int n;
  cin >> n;
  int a[n], gc = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    gc = gcd(gc, a[i]);
  }
  if (n > 80000) {
    if (gc != 1)
      cout << "not coprime\n";
    else
      cout << "setwise coprime\n";
  } else {
    int pri[1000001] = {0}, f = 0;
    for (int i = 0; i < n; i++) {
      int t = a[i];
      for (int j = 2; j * j <= t; j++) {
        if (a[i] % j == 0) {
          while (a[i] % j == 0 && a[i] > 1) a[i] /= j;
          if (!pri[j])
            pri[j]++;
          else {
            f = 1;
            break;
          }
        }
        if (f) break;
      }
      if (a[i] > 1) {
        if (!pri[a[i]])
          pri[a[i]]++;
        else
          f = 1;
      }
      if (f) break;
    }
    if (f) {
      if (gc != 1)
        cout << "not coprime\n";
      else
        cout << "setwise coprime\n";
    } else
      cout << "pairwise coprime\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T = 1;
  while (T--) solve();
}
