#include <bits/stdc++.h>
using namespace std;
int a[1000010];
bool used[1000010];
bool flag = true;
void solve(int x) {
  used[x] = true;
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) {
      if (used[i] == true || used[x / i] == true) flag = false;
      used[i] = true;
      used[x / i] = true;
    }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    solve(a[i]);
    if (flag == false) break;
  }
  if (flag == true) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int cnt = 1e9;
  for (int i = 0; i < n; i++)
    if (cnt > a[i]) cnt = a[i];
  for (int i = 2; i * i <= cnt; i++)
    if (cnt % i == 0) {
      bool flag2 = false;
      for (int j = 0; j < n; j++)
        if (a[j] % i != 0) {
          flag2 = true;
          break;
        }
      if (flag2 == false) {
        cout << "not coprime" << endl;
        return 0;
      }
      flag2 = false;
      for (int j = 0; j < n; j++)
        if (a[j] % (cnt / i) != 0) {
          flag2 = true;
          break;
        }
      if (flag2 == false) {
        cout << "not coprime" << endl;
        return 0;
      }
    }
  bool flag2 = false;
  for (int j = 0; j < n; j++)
    if (a[j] % cnt != 0) {
      flag2 = true;
      break;
    }
  if (flag2 == false) {
    cout << "not coprime" << endl;
    return 0;
  }
  cout << "setwise coprime" << endl;
  return 0;
}
