#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<int> primes;
  for (int i = 2; i <= 1e3; i++) {
    bool f = true;
    for (auto x : primes) {
      if (i % x == 0)
        f = false;
    }
    if (f)
      primes.push_back(i);
  }

  vector<bool> used(1e6 + 1, false);
  bool f = true;
  for (auto x : a) {
    if (x == 1)
      continue;
    for (auto p : primes) {
      if (x % p != 0)
        continue;
      if (used[p])
        f = false;
      // if (used[x / p])
      //   f = false;
      used[p] = true;
      // used[x / p] = true;
    }
    if (x > 1e3) {
      if (used[x])
        f = false;
      used[x] = 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;
}
