#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (true) {
    if (a % b == 0 || b % a == 0) {
      if (a > b)
        return b;
      else
        return a;
    }
    if (a > b)
      a = a % b;
    else
      b = b % a;
  }
}
int n, a[1000008];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int flag = 0, i, j, time = 0;
  for (i = 1; i < n; i++) {
    for (j = i + 1; j <= n; j++) {
      if (gcd(a[i], a[j]) == 1) {
        time++;
      } else {
        flag = 1;
      }
      if (flag == 1 && time > 0) goto a;
    }
  }
a:
  if (i == n && j == n + 1) {
    cout << "pairwise coprime" << endl;
  } else if (time >= 0) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
