#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int q[N];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> q[i];
  }
  int t = q[1];
  bool ispair = true;
  for (int i = 1; i <= n - 1; i++) {
    t = gcd(t, q[i + 1]);
    if (t != 1) {
      ispair = false;
    }
  }
  if (t != 1) {
    cout << "not coprime" << endl;
  } else {
    if (ispair)
      cout << "pairwise coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  }
}
