#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int gcd(int x, int y) {
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
int main(void) {
  int n;
  bool ispc = true, issc = true;
  cin >> n;
  vector<int> a(n + 1), b(1000001, 0);
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i : a) b[i]++;
  for (int i = 2; i <= n; i++) {
    int temp = 0;
    for (int j = i; j <= 1000000; j += i) {
      temp += b[j];
    }
    ispc = ispc and (temp <= 1);
  }
  int temp2 = a[1];
  for (int i = 2; i <= n; i++) {
    temp2 = gcd(temp2, a[i]);
  }
  issc = (temp2 == 1);
  if (ispc)
    cout << "pairwise coprime" << endl;
  else if (issc)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
