#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> p;
void sive() {
  bool visit[1000008];
  memset(visit, 0, sizeof(visit));
  for (int i = 4; i <= 1000000; i += 2) visit[i] = true;
  for (int i = 3; i * i <= 1000000; i += 2) {
    if (visit[i] == false) {
      for (int j = i * i; j <= 1000000; j += 2 * i) visit[j] = true;
    }
  }
  p.push_back(2);
  for (int i = 3; i <= 1000000; i += 2)
    if (visit[i] == false) p.push_back(i);
}
int main() {
  sive();
  cin >> n;
  int arr[1000005];
  memset(arr, 0, sizeof(arr));
  int num2 = false, numn = false;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    for (int j = 0; j < p.size(); j++) {
      if (temp >= p[j]) {
        if (temp % p[j] == 0) {
          while (temp % p[j] == 0) temp /= p[j];
          arr[p[j]]++;
          temp /= p[j];
        }
        if (arr[p[j]] == 2)
          num2 = true;
        else if (arr[p[j]] == n)
          numn = true;
      } else
        break;
    }
  }
  if (numn) {
    cout << "not coprime";
  } else if (num2)
    cout << "setwise coprime";
  else
    cout << "pairwise coprime";
  return 0;
}
