#include <bits/stdc++.h>
using namespace std;
int n;
const int MAX_N = 1000001;
vector<int> d(MAX_N, 0);
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  cin >> n;
  vector<int> a(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    d[a[i]]++;
  }
  bool pairwise = true;
  for (int i = 2; i <= MAX_N; i++) {
    int cnt = 0;
    for (int j = i; j <= MAX_N; j += i) {
      if (d[j] > 0) cnt += 1;
    }
    if (cnt > 1) {
      pairwise = false;
      break;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime";
    return 0;
  }
  int g = 0;
  for (int i = 0; i < n; i++) {
    g = gcd(a[i], g);
  }
  if (g == 1) {
    cout << "setwise coprime";
    return 0;
  }
  cout << "not coprime";
  return 0;
}
