#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
vector<long long> divisor(long long n) {
  vector<long long> ret;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(begin(ret), end(ret));
  return (ret);
}
int main() {
  long long result{0};
  long long n, b[1000000 + 2] = {};
  cin >> n;
  bool TF = true;
  for (long long i = 0; i < long long(n); i++) {
    int num;
    cin >> num;
    vector<long long> a = divisor(num);
    if (TF)
      for (long long j = 1; j <= long long(a.size() - 1); j++) {
        if (b[a[j]] == 0)
          b[a[j]]++;
        else
          TF = false;
      }
  }
  if (TF)
    cout << "pairwise coprime" << endl;
  else {
    cout << "not coprime" << endl;
  }
  return 0;
}
