#include <bits/stdc++.h>
const long double PI = 3.141592653589793236L;
using namespace std;
int gcd(int x, int y) {
  if (x == 0) {
    return y;
  }
  return gcd(y % x, x);
}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int GCD = gcd(a[0], a[1]);
  for (int i = 0; i < n; i++) {
    GCD = gcd(GCD, a[i]);
  }
  bool setwise = false;
  if (GCD == 1) {
    setwise = true;
  } else {
    setwise = false;
  }
  map<int, int> mp;
  bool is_pairwise = true;
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 0) {
      mp[2]++;
      while (a[i] % 2 == 0) {
        a[i] /= 2;
      }
      if (mp[2] > 1) {
        is_pairwise = false;
        break;
      }
    }
    for (int j = 3; j * j <= n; j++) {
      if (a[i] % j == 0) {
        mp[j]++;
        while (a[i] % j == 0) {
          a[i] /= j;
        }
        if (mp[j] > 1) {
          is_pairwise = false;
          break;
        }
      }
    }
    if (a[i] > 2) {
      mp[a[i]]++;
      if (mp[a[i]] > 1) {
        is_pairwise = false;
        break;
      }
    }
  }
  if (is_pairwise) {
    cout << "pairwise coprime\n";
  } else if (setwise) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
