#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vll = vector<long long>;
using vvll = vector<vll>;
using vs = vector<string>;
using pll = pair<long long, long long>;
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int main() {
  bool ans = true;
  long long n, gcdall;
  cin >> n;
  vll a(n), lcdall(n);
  for (long long(i) = 0; (i) < (n); (i)++) cin >> a.at(i);
  gcdall = a.at(0);
  for (long long(i) = 0; (i) < (n - 1); (i)++) {
    gcdall = gcd(gcdall, a.at(i + 1));
  }
  lcdall.at(n - 1) = a.at(n - 1);
  for (long long i = n - 1; i > 0; i--) {
    lcdall.at(i - 1) = lcm(lcdall.at(i), a.at(i - 1));
  }
  for (long long(i) = 0; (i) < (n - 1); (i)++) {
    if (gcd(a.at(i), lcdall.at(i + 1)) == 1) {
    } else
      ans = false;
  }
  if (ans)
    cout << "pairwise coprime" << endl;
  else {
    if (gcdall == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
