#include <bits/stdc++.h>
using namespace std;
int n;
int a[1000000];
bool f = 0, g = 0;
int gcd(int a, int b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int d = a[0];
  for (int i = 1; i < n; i++) {
    d = gcd(d, a[i]);
    if (d == 1) {
      g = 1;
      break;
    }
  }
  if (!g)
    cout << "not coprime" << endl;
  else {
    for (int i = 0; i < n - 1; i++) {
      for (int j = i + 1; j < n; j++) {
        if (gcd(a[i], a[j]) != 1) {
          f = 1;
          break;
        }
      }
    }
    if (f)
      cout << "setwise coprime" << endl;
    else
      cout << "pairwise coprime" << endl;
  }
}
