#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  int n;
  cin >> n;
  std::vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v.at(i);
  }
  int max = 1;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      int a = v.at(i);
      int b = v.at(j);
      int gc = gcd(a, b);
      if (gc > max) max = gc;
    }
  }
  if (max == 1) {
    cout << "pairwise coprime" << endl;
  } else {
    int ans = 0;
    for (int i = 2; i <= max; i++) {
      if (max % i == 0) {
        int hantei = 0;
        for (int j = 0; j < n; j++) {
          if (v.at(j) % i != 0) {
            hantei = 1;
          }
        }
        if (hantei == 0) {
          ans = 1;
        }
      }
    }
    if (ans == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
}
