#include <bits/stdc++.h>
using namespace std;
void io() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
long long gcdf(long long a, long long b) {
  if (b == 0) return a;
  return gcdf(b, a % b);
}
int main() {
  io();
  int n;
  cin >> n;
  long long a;
  cin >> a;
  set<int> s;
  s.insert(a);
  int one = 0;
  one += (a == 1);
  long long lcm = a, gcd = a, pro = a;
  for (int i = 1; i < n; i++) {
    cin >> a;
    one += (a == 1);
    s.insert(a);
    pro *= a;
    gcd = gcdf(gcd, a);
    lcm = lcm * a / gcdf(lcm, a);
  }
  if (gcd != 1)
    cout << "not coprime";
  else if (lcm == pro && n == (int)s.size() + one - 1)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
  return 0;
}
