#include <bits/stdc++.h>
using namespace std;
bool cc[1000000 + 5], viz[78498 + 5];
int v[1000000 + 5];
vector<int> prime;
void ciur() {
  int i, j;
  cc[0] = cc[1] = 1;
  for (i = 2; i * i <= 1000000; i++)
    if (!cc[i])
      for (j = i * i; j <= 1000000; j += i) cc[j] = 1;
  for (i = 2; i <= 1000000; i++)
    if (!cc[i]) prime.push_back(i);
}
int gcd(int a, int b) {
  if (b > 0) return gcd(b, a % b);
  return a;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ciur();
  int n;
  cin >> n;
  int i, j, z;
  for (i = 1; i <= n; i++) cin >> v[i];
  bool cop = 1, dv;
  for (i = 1; i <= n && cop; i++) {
    z = v[i];
    j = 0;
    while (z > 1 && j < (int)(prime).size() && cop) {
      dv = 0;
      while (z > 1 && z % prime[j] == 0) {
        dv = 1;
        z /= prime[j];
      }
      if (dv) {
        cop &= (!viz[j]);
        viz[j] = 1;
      }
      j++;
    }
  }
  if (cop)
    cout << "pairwise coprime";
  else {
    int ans = 0;
    for (i = 1; i <= n; i++) ans = gcd(v[i], ans);
    if (ans == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
  return 0;
}
