#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long GCD(long long a, long long b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
int prime[1000001];
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int wholegcd;
  for (long long i = 0; i < (long long)(n); ++i) {
    cin >> a[i];
    if (i == 0)
      wholegcd = a[i];
    else
      wholegcd = GCD(wholegcd, a[i]);
  }
  bool pairwise = true;
  prime[1] = 1;
  for (long long i = 0; i < (long long)(n); ++i) {
    if (a[i] != 1 && prime[a[i]] == 1) {
      pairwise = false;
      break;
    } else {
      prime[a[i]] = 1;
    }
    for (int k = 2; k * k <= a[i]; k++) {
      if (a[i] % k == 0) {
        if (prime[k] == 1) {
          pairwise = false;
          break;
        } else {
          prime[k] = 1;
        }
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (wholegcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
