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