#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const long long int INF = LLONG_MAX;
const long long int mod = 1e9 + 7;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i <= n - 1; i++) cin >> a[i];
  long long int setwise = a[0];
  for (long long int i = 1; i <= n - 1; i++) setwise = gcd(setwise, a[i]);
  vector<bool> vis(1000001, true);
  vis[0] = false;
  vis[1] = false;
  vector<vector<long long int> > ans(1000001);
  for (long long int i = 2; i <= 1000000; i++) {
    if (vis[i]) {
      ans[i].push_back(i);
      for (long long int j = 2 * i; j <= 1000000; j += i) {
        vis[j] = false;
        ans[j].push_back(i);
      }
    }
  }
  set<long long int> allpr;
  bool flag = true;
  for (long long int i = 0; i <= n - 1; i++) {
    for (decltype(ans[a[i]].begin()) it = ans[a[i]].begin();
         it != ans[a[i]].end(); it++) {
      if ((allpr.find(*it) != allpr.end())) {
        flag = false;
        break;
      } else
        allpr.insert(*it);
    }
    if (!flag) break;
  }
  if (flag)
    cout << "pairwise coprime";
  else if (setwise == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
