#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline void chmin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void chmax(T1 &a, T2 b) {
  if (a < b) a = b;
}
int gcd(int a, int b) {
  while (b != 0) {
    a %= b;
    if (a == 0) return b;
    b %= a;
  }
  return a;
}
signed main() {
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> mp;
  bool ok = 1;
  int G;
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    int mx = a[i];
    if (i == 0)
      G = a[i];
    else
      G = gcd(G, a[i]);
    if (ok) {
      if (mx != 1 && mp[mx] > 0) ok = 0;
      mp[mx]++;
      for (int j = 2; j * j <= mx; j++) {
        if (mx % j == 0) {
          if (mp[j] > 0) ok = 0;
          if (mp[mx / j] > 0) ok = 0;
          mp[j]++;
          mp[mx / j]++;
          while (mx % j == 0) {
            mx /= j;
          }
        }
      }
      if (mx != 1) {
        if (mp[mx] > 0) ok = 0;
        mp[mx]++;
      }
    }
  }
  if (ok)
    cout << "pairwise coprime" << endl;
  else if (G == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
