#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (x == 0)
    return y;
  else
    return gcd(y % x, x);
}
int main() {
  int n, t, all = 0;
  bool p = true;
  cin >> n;
  vector<long long> a(n, 0);
  cin >> a[0];
  all = gcd(all, a[0]);
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    all = gcd(all, a[i]);
    t = gcd(a[i - 1], a[i]);
    if (t != 1) p = false;
  }
  if (p)
    cout << "pairwise coprime";
  else if (all == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
