#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> A(n);
  for (long long i = 0; i < n; ++i) cin >> A[i];
  vector<long long> div(1000001, 0);
  for (long long i = 0; i < n; ++i) {
    long long tmp = A[i];
    if (tmp % 2 == 0) {
      div[2]++;
      while (tmp % 2 == 0) tmp /= 2;
    }
    for (long long d = 3; d * d <= tmp; d += 2)
      if (tmp % d == 0) {
        div[d]++;
        while (tmp % d == 0) tmp /= d;
      }
    if (tmp > 1) div[tmp]++;
  }
  long long m = *max_element(div.begin(), div.end());
  if (m < 2)
    cout << ("pairwise coprime") << endl;
  else if (m < 2)
    cout << ("setwise coprime") << endl;
  else
    cout << ("not coprime") << endl;
  return 0;
}
