#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using V = vector<T>;
template <class T, class U>
using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const long long MOD = 1000000007;
const long long HIGHINF = (long long)1e18;
const int INF = (int)1e9;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  V<int> a(n);
  int allg = 0;
  V<bool> div(1000001, false);
  bool pac = true;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    allg = gcd(a[i], allg);
    if (pac) {
      for (int j = 2; j * j <= a[i]; j++) {
        if (a[i] % j == 0) {
          if (div[j]) {
            pac = false;
            break;
          }
          div[j] = true;
          while (a[i] % j == 0) a[i] /= j;
        }
      }
    }
  }
  if (pac)
    cout << "pairwise coprime\n";
  else if (allg == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
