#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int ddx[8] = {1, 1, 0, -1, -1, -1, 0, 1}, ddy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
long long gcd(long long a, long long b) {
  if (!a) return b;
  return gcd(b % a, a);
}
bool isprime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
void test_case() {
  int n;
  cin >> n;
  vector<long long> arr(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> arr[i];
  }
  long long gd = arr[n - 1];
  unordered_set<int> st;
  bool check = true;
  for (int i = n - 2; i >= 0; i--) {
    gd = gcd(arr[i], gd);
  }
  if (gd != 1) {
    cout << "not coprime"
         << "\n";
    return;
  }
  sort(arr.begin(), arr.end());
  for (int i = n - 1; i >= 0; i--) {
    for (int j = 2; j <= sqrt(arr[i]); j++) {
      if (arr[i] % j == 0) {
        if (st.find(j) != st.end()) {
          check = false;
          break;
        }
        int val = arr[i] / j;
        if (arr[i] % val == 0) {
          if (st.find(val) != st.end()) {
            check = false;
            break;
          }
          st.insert(val);
        }
        st.insert(j);
      }
      st.insert(arr[i]);
    }
  }
  if (check == true) {
    cout << "pairwise coprime"
         << "\n";
    return;
  }
  if (check == false) {
    cout << "setwise coprime"
         << "\n";
    return;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(20);
  int t = 1;
  while (t--) {
    test_case();
  }
}
