#include <bits/stdc++.h>
using namespace std;
using Int = long long;
int PREP = (cin.tie(nullptr), ios::sync_with_stdio(false),
            cout << fixed << setprecision(9), 0);
const int MAX = 1000000;
int table[MAX + 1], counter[MAX + 1];
int main() {
  for (int i = 2; i <= 1000; i++) {
    if (table[i] != 0) continue;
    for (int k = i; k <= MAX; k += i) {
      if (table[k] == 0) table[k] = i;
    }
  }
  for (int i = 2; i <= MAX; i++)
    if (table[i] == 0) {
      table[i] = i;
    }
  int N;
  cin >> N;
  vector<int> A(N);
  for (auto &a : A) cin >> a;
  for (int a : A) {
    set<int> S;
    int b = a;
    while (b != 1) {
      S.emplace(table[b]);
      b /= table[b];
    }
    for (auto p : S) {
      counter[p]++;
    }
  }
  int maxval = 0;
  for (int i = 2; i <= MAX; i++) {
    maxval = max(maxval, counter[i]);
  }
  if (maxval == 1) {
    cout << "pairwise coprime\n";
  } else if (maxval != N) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
