#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T>
void print(T t) {
  cout << t << endl;
}
ll MOD = 1000000007;
int A[1000002] = {0};
map<int, int> primemap;
void era(int n) {
  for (int i = 2; i * i < n; ++i) {
    if (A[i] == 0) {
      for (int j = i; i * j < n; ++j) {
        if (A[i * j] == 0) A[i * j] = i;
      }
    }
  }
  for (int i = 2; i < n; ++i) {
    if (A[i] == 0) {
      primemap[i] = 0;
      A[i] = i;
    }
  }
  A[0] = 1;
  A[1] = 1;
}
int main() {
  int N, maxA = 1000000;
  era(maxA + 1);
  cin >> N;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    while (true) {
      if (a == 1) {
        break;
      } else if (A[a] == 0) {
        primemap[a]++;
        break;
      } else {
        primemap[A[a]]++;
        while (A[a] != 1) a /= A[a];
      }
    }
  }
  int maxW = 0;
  for (auto it = primemap.begin(); it != primemap.end(); it++) {
    maxW = max(maxW, it->second);
  }
  if (maxW <= 1) {
    cout << "pairwise coprime" << endl;
  } else if (maxW == N) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
