#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long double PI = acos(-1);
const long double EPS = 0.0000000001;
const long long LINF = 1001002003004005006ll;
const int INF = 1001001001;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  map<long long, long long> key;
  long long res = 1;
  sort(a.begin(), a.end());
  for (long long k = 0; k < (long long)(n); k++) {
    long long tmp = a[k];
    for (int i = 2; i * i <= tmp; i++) {
      if (tmp % i == 0 && 0 < key[i]) res = 0;
      if (tmp % i == 0) key[i] += 1;
      while (tmp % i == 0) {
        tmp /= i;
      }
    }
    if (1 < tmp) {
      if (0 < key[tmp]) res = 0;
      key[tmp] += 1;
    }
  }
  if (res == 1)
    cout << "pairwise coprime";
  else {
    res = 1;
    for (auto x : key) {
      if (x.second == n) {
        res = 0;
        break;
      }
    }
    if (res == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
  cout << endl;
}
