#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  long long n, pr = 1;
  cin >> n;
  vector<long long> a(n);
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    pr *= a[i];
    if (i == 1) {
      ans = gcd(a[i], a[i - 1]);
    } else {
      ans = gcd(ans, a[i]);
    }
  }
  if (ans > 1) {
    cout << "not coprime" << endl;
  } else {
    bool f = 1;
    long long an = a[n - 1], prr = a[n - 1];
    for (long long i = n - 2; i >= 0; i--) {
      prr *= a[i];
      an = (an * a[i]) / gcd(an, a[i]);
      if (an != prr) {
        f = 0;
        break;
      }
    }
    if (f) {
      cout << "pairwise coprime" << endl;
    } else {
    }
  }
}
