#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
using pii = pair<int, int>;

const int A = 1000006;
int main() {
  int n;
  cin >> n;
  vector<int> a(A);

  int memo[1001000] = {};

  for (int i = 0; i < n; i++) {
    cin >> a[i];
    memo[a[i]]++;
  }

  sort(a.begin(), a.end());

  int totalgcd = a[0];

  for (int i = 1; i < n; i++) {
    totalgcd = __gcd(totalgcd, a[i]);
  }
  // if totalgcd = 1 setwise coprime

  bool flag = true;
  for (int i = 2; i < A; i++) {
    int cnt = 0;
    for (int j = i; j < A; j += i) {
      cnt += a[j];
    }
    if (cnt > 1) {
      cout << "pairwise coprime" << endl;
      return 0;
    }
  }

  cout << (totalgcd == 1 ? "setwise coprime" : "not coprime") << endl;
}