#include <bits/stdc++.h>
using namespace std;
map<int64_t, int64_t> prime_fact(int64_t n) {
  int64_t a = 2;
  map<int64_t, int64_t> mp;
  while (n >= a * a) {
    if (n % a == 0) {
      if (mp.count(a)) {
        mp[a]++;
      } else {
        mp[a] = 1;
      }
      n /= a;
    } else {
      a++;
    }
  }
  if (mp.count(n)) {
    mp[n]++;
  } else {
    mp[n] = 1;
  }
  return mp;
}
int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec[i];
  }
  bool pairwise = true;
  bool setwise = true;
  set<int> S;
  set<int> common;
  for (int i = 0; i < N; i++) {
    if (i == 0) {
      map<int64_t, int64_t> A = prime_fact(vec[i]);
      for (auto itr = A.begin(); itr != A.end(); itr++) {
        S.insert(itr->first);
      }
    } else {
      map<int64_t, int64_t> A = prime_fact(vec[i]);
      for (auto itr = A.begin(); itr != A.end(); itr++) {
        if (S.count(itr->first)) {
          pairwise = false;
          common.insert(itr->first);
        }
        S.insert(itr->first);
      }
    }
    if (!pairwise) {
      break;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (auto itr = common.begin(); itr != common.end(); itr++) {
    int cnt = 0;
    for (int i = 0; i < N; i++) {
      if (vec[i] % *itr == 0) {
        cnt++;
      }
    }
    if (cnt == N) {
      setwise = false;
      break;
    }
  }
  if (setwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
