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