#include <bits/stdc++.h>
using namespace std;
int num[1000010];
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) {
    int x;
    cin >> x;
    a[i] = x;
    num[x]++;
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < (int)(n); i++) {
    for (int j = 2; j < n / a[i] + 1; j++) {
      if (a[i] * j > 1000010) break;
      num[a[i] * j] = 0;
    }
  }
  int sum = 0;
  for (int i = 0; i < (int)(1000010); i++) sum += num[i];
  if (sum == 0)
    cout << "pairwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
