#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
void debug() {}
int main() {
  debug();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, flag = 1, x, count = 0;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      x = gcd(a[i], a[j]);
      if (x != 1) {
        flag = 0;
        break;
      }
    }
  }
  if (flag == 0) {
    for (int i = 0; i < n; i++) {
      if (a[i] % 2 == 0) count++;
    }
    if (count == n)
      cout << "not coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  } else
    cout << "pairwise coprime" << endl;
}
