#include <bits/stdc++.h>
using namespace std;
int fgcd(int x, int y) {
  if (y > x) {
    swap(x, y);
  }
  while (y != 0) {
    int temp = y;
    y = x % y;
    x = temp;
  }
  return x;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int gcd = 0;
  vector<int> cnt(1e6 + 10), a(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    for (int j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        if (j != 1) {
          cnt[j]++;
        }
        if (a[i] / j != j) {
          cnt[a[i] / j]++;
        }
      }
    }
  }
  bool yes = true;
  for (int i = 1; i <= 1e6; i++) {
    if (cnt[i] > 1) {
      yes = false;
    }
  }
  if (yes == true) {
    cout << "pairwise coprime";
    return 0;
  }
  for (int i = 1; i <= 1e6; i++) {
    if (cnt[i] >= n) {
      cout << "not coprime";
      return 0;
    }
  }
  cout << "setwise coprime";
}
