#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ldb = long double;
int main() {
  int N;
  cin >> N;
  vector<ll> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  vector<bool> num(1e6 + 1, true);
  map<int, int> mp;
  for (int i = 2; i <= 1e6; i++) {
    if (num[i]) {
      mp[i] = true;
      for (int j = 2; i * j <= 1e6; j++) {
        num[i * j] = false;
      }
    }
  }
  map<int, int> cnt;
  vector<map<int, int>> mul(N);
  for (int i = 0; i < N; i++) {
    for (auto x : mp) {
      while (a[i] % x.first == 0) {
        a[i] /= x.first;
        mul[i][x.first]++;
        if (mul[i][x.first] == 1) cnt[x.first]++;
      }
      if (a[i] > 2) mul[i][a[i]]++;
      if (mul[i][a[i]] == 1) cnt[a[i]]++;
    }
  }
  int ty = 0;
  for (auto y : cnt) {
    if (y.second == N) {
      ty = 2;
      break;
    } else if (y.second >= 2) {
      ty = 1;
    }
  }
  if (ty == 0) cout << "pairwise coprime" << endl;
  if (ty == 1) cout << "setwise coprime" << endl;
  if (ty == 2) cout << "not coprime" << endl;
}
