#include <bits/stdc++.h>
using namespace std;
unordered_map<int, int> dp2;
bool coprime(int n) {
  if (dp2.find(n) != dp2.end()) return 0;
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (dp2.find(i) != dp2.end() || dp2.find(n / i) != dp2.end())
        return 0;
      else if (i != n / i)
        dp2[i]++, dp2[n / i]++;
      else
        dp2[i]++;
    }
  }
  return 1;
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  bool f = 1;
  for (int i = 0; i < n; i++)
    if (!coprime(a[i])) {
      f = 0;
      break;
    }
  if (f)
    cout << "pairwise coprime";
  else {
    bool g = 0;
    int y = a[0];
    for (int i = 1; i < n; i++) {
      y = gcd(y, a[i]);
      if (y == 1) {
        g = 1;
        break;
      }
    }
    if (g)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
}
