#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() {
  int n;
  cin >> n;
  vector<int> A(n + 1);
  for (int i = 1; i <= n; i++) cin >> A[i];
  long long int prod = 1;
  for (int i = 1; i <= n; i++) prod *= A[i];
  long long int lcm, prev_lcm = A[1];
  for (int i = 2; i <= n; i++) {
    lcm = prev_lcm * A[i] / gcd(prev_lcm, A[i]);
    prev_lcm = lcm;
  }
  int GCD = A[1];
  for (int i = 2; i <= n; i++) {
    GCD = gcd(GCD, A[i]);
  }
  if (prod == lcm)
    cout << "pairwise coprime" << endl;
  else if (GCD == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
