#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a > b) swap(a, b);
  if (b % a == 0) {
    return a;
  } else {
    return gcd(a, b % a);
  }
}
int main() {
  int n, m, i, j, cur, ans;
  cin >> n;
  vector<int> a(n);
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  cur = a[0];
  for (i = 1; i < n; i++) {
    cur = gcd(cur, a[i]);
  }
  if (cur > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<bool> p(1000001, false);
  for (i = 0; i < n; i++) {
    for (j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        if (p[j] == true) {
          cout << "setwise coprime" << endl;
          return 0;
        } else {
          p[j] = true;
          while (a[i] % j != 0) {
            a[i] /= j;
          }
        }
      }
    }
    if (a[i] > 1) {
      if (p[a[i]] == true) {
        cout << "setwise coprime" << endl;
        return 0;
      } else {
        p[a[i]] = true;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
