#include <bits/stdc++.h>
using namespace std;
int used[200500];
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long ch[1050000];
long long ch1[1050000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  long long t, i, curr, p = 1, x, y, weight, j, k = 0, n, m = 1, ans = 0;
  long long a, b;
  int fl, fl1, fl2, fl3;
  string s, s1;
  long long f, size_f, size_s, weight1, weight2;
  long long sum, k_min, k_max;
  long long d;
  cin >> n;
  fl = 0;
  fl1 = 0;
  long long* arr = new long long[n + 5];
  for (i = 0; i < n; i++) cin >> arr[i];
  for (i = 2; i <= (long long)1e6 + 5; i++) ch[i] = 1;
  for (i = 2; i <= (long long)1e6 + 5; i++)
    for (j = 2; i * j <= (long long)1e6 + 5; j++) ch[i * j] = 0;
  long long it22 = 0;
  for (i = 2; i <= (long long)1e6 + 5; i++)
    if (ch[i] == 1) {
      ch1[it22] = i;
      it22++;
    }
  long long check;
  map<long long, long long> mapa;
  if (n < 100000) {
    for (i = 0; i < n; i++) {
      for (auto it = 0; it < it22; it++)
        if (arr[i] % ch1[it] == 0) mapa[ch1[it]]++;
    }
    fl = 0;
    fl1 = 0;
    for (auto it : mapa) {
      if (it.second == n) {
        fl = 1;
      }
      if (it.second > 1) fl1 = 1;
    }
    if (fl)
      cout << "not coprime";
    else {
      if (fl1)
        cout << "setwise coprime";
      else
        cout << "pairwise coprime";
    }
  } else {
    long long cch = arr[0];
    fl = 0;
    for (i = 1; i < n; i++) {
      cch = gcd(arr[i], cch);
      if (cch == 1) {
        fl = 1;
        break;
      }
    }
    if (fl)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
  return 0;
}
