#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int f2 = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> arr(1000007, 0);
  for (auto x : a) arr[x] += 1;
  int f1 = 1;
  for (int i = 2; i < 1000007; i++) {
    int ct = 0;
    f1 = f1 & (ct <= 1);
  }
  if (f1 == 1) {
    cout << "pairwise coprime" << endl;
  } else if (f2 == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 1;
}
