#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const long long linf = 1LL << 50;
const double eps = 1e-10;
const int MOD = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  if (a < b) gcd(b, a);
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < ((int)n); i++) cin >> a[i];
  bool is_pc = true;
  long long rem = 1;
  for (int i = 0; i < ((int)n); i++) {
    long long now = gcd(rem, a[i]);
    if (now != 1) {
      is_pc = false;
      break;
    }
    rem *= a[i];
  }
  bool is_sc = true;
  long long now = a[0];
  for (long long i = 1; i < n; i++) now = gcd(now, a[i]);
  if (now != 1) is_sc = false;
  if (is_pc)
    cout << "pairwise coprime" << endl;
  else if (is_sc)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
