#include <bits/stdc++.h>
using namespace std;
bool isPrime(int a) {
  if (a == 1) return 0;
  if (a == 2) return 1;
  if (a % 2 == 0) return 0;
  for (int i = 3; i * i <= a; i++) {
    if (a % i == 0) return 0;
  }
  return 1;
}
int main() {
  int n;
  cin >> n;
  vector<vector<int>> dp(n, vector<int>(168, 0));
  vector<vector<bool>> bp(n, vector<bool>(168, 0));
  vector<int> PL(0);
  vector<pair<int, int>> PP(0);
  int count = 0;
  for (int i = 0; i < 1001; i++) {
    if (isPrime(i)) {
      PL.push_back(i);
      PP.push_back(make_pair(i, count));
      count++;
    }
  }
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    count = 0;
    while (count < 168) {
      while (a % PL[count] == 0) {
        a /= PL[count];
        dp[i][count]++;
        bp[i][count] = 1;
      }
      count++;
    }
  }
  bool fail = 0;
  for (int j = 0; j < 168; j++) {
    int sum = 0;
    for (int i = 0; i < n; i++) sum += bp[i][j];
    if (sum == 0) continue;
    if (sum > 1) fail = 1;
  }
  if (!fail) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (int j = 0; j < 168; j++) {
    int sum = 0;
    for (int i = 0; i < n; i++) sum += bp[i][j];
    if (sum == 0) continue;
    if (sum == n) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
}
