#include <bits/stdc++.h>
using namespace std;
long long md = 1000000007;
class gfg {
 public:
  int gcd(int a, int b) {
    if (a == 0) return b;
    return gcd(b % a, a);
  }
  int lcm(int a, int b) { return (a * b) / gcd(a, b); }
};
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  long long n;
  cin >> n;
  vector<long long> arr;
  for (long long i = 0; i < n; i++) {
    long long temp;
    cin >> temp;
    arr.push_back(temp);
  }
  long long lcm = 1;
  gfg g;
  long long flag = 0;
  for (long long i = 0; i < n; i++) {
    long long temp = gcd(lcm, arr[i]);
    if (temp == 1) {
      lcm = g.lcm(lcm, arr[i]);
      continue;
    }
    flag = 1;
    break;
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
  } else {
    long long temp = arr[0];
    long long gc = temp;
    for (long long i = 0; i < n; i++) {
      gc = gcd(gc, arr[i]);
    }
    if (gc == 1)
      cout << "setwise coprime" << endl;
    else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
