#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e15;
const int mxN = 2e2;
vector<int> get_div(int x) {
  vector<int> divisors;
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      if (i == x / i) {
        divisors.push_back(i);
      } else {
        divisors.push_back(i);
        divisors.push_back(x / i);
      }
    }
  }
  divisors.push_back(x);
  return divisors;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  vector<int> div = get_div(a[0]);
  int t = div.size();
  for (int i = 0; i < t; i++) {
    int p = div[i];
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] % p == 0) cnt++;
    }
    if (cnt == n) {
      cout << "not coprime";
      return 0;
    }
  }
  for (int i = 0; i < t; i++) {
    int p = div[i];
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] % p == 0) cnt++;
    }
    if (cnt >= 2) {
      cout << "setwise coprime";
      return 0;
    }
  }
  cout << "pairwise coprime";
  return 0;
}
