#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);

  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++)
    cin >> a[i];

  vector<bool> used(1e6 + 1, false);
  bool f = true;
  for (auto x : a) {
    if (used[x])
      f = false;
    used[x] = true;
    for (int i = 2; i * i <= x; i++) {
      if (x % i != 0)
        continue;
      if (used[i])
        f = false;
      if (used[x / i])
        f = false;
      used[i] = true;
      used[x / i] = true;
    }
  }

  if (f) {
    cout << "pairwise coprime" << endl;
    return 0;
  }

  int g = a[0];
  for (auto x : a) {
    g = __gcd(g, x);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }

  cout << "not coprime" << endl;

  return 0;
}
