#include <bits/stdc++.h>
using namespace std;
set<int> primes(long long n, bool flog = false) {
  int N = ((int)sqrt(n)) + 1;
  vector<bool> num(N, true);
  set<int> p;
  for (int i = 2; i < N; i++) {
    if (num[i]) {
      p.insert(i);
      if (flog) cout << "primes " << i << endl;
      for (int j = i; j < N; j += i) {
        num[j] = false;
      }
    }
  }
  return p;
}
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N, 0);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  set<int> P = primes(1000000, false);
  bool pc = true;
  while (!P.empty()) {
    int p = *P.begin();
    P.erase(p);
    int score = 0;
    for (int i = 0; i < N; i++) {
      if ((A[i] % p) == 0) {
        A[i] /= p;
        score++;
      }
    }
    if (score == N) {
      cout << "not coprime" << endl;
      return (0);
    }
    if (score >= 2) {
      pc = false;
    }
  }
  int ss = 0;
  set<long long> SSS;
  for (int i = 0; i < N; i++) {
    if (A[i] > 1) {
      P.insert(A[i]);
      ss++;
      SSS.insert(A[i]);
    }
  }
  if (ss > SSS.size()) {
    pc = false;
  }
  if (pc && SSS.size() == 1) {
    cout << "not coprime" << endl;
    return (0);
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return (0);
}
