#include <bits/stdc++.h>
#define ff first
#define ss second
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
const ll mod = 1e9 + 7;
const int maxn = 1e6 + 10;
array <int, maxn> cnt, spf;

void solve() {
   for (int i = 1; i < maxn; i++) {
      spf[i] = i;
   }
   for (int i = 2; i < maxn; i += 2) {
      spf[i] = 2;
   }
   for (int i = 3; i * i < maxn; i++) {
      if (spf[i] == i) {
         for (int j = i * i; j < maxn; j++) {
            if (spf[j] == j)
               spf[j] = i;
         }
      }
   }
   int n;
   cin >> n;
   vector <int> a(n);
   for (auto &i : a) {
      cin >> i;
   }
   auto update = [&] (int val) {
      set <int> s;
      while (val != 1) {
         s.insert(spf[val]);
         val /= spf[val];
      }
      for (auto i : s)
         cnt[i]++;
   };
   for (int i = 0; i < n; i++) {
      update(a[i]);
   }
   int hcf = a[0];
   bool pair = false;
   for (int i = 0; i < n; i++) {
      hcf = __gcd(hcf, a[i]);
   }
   for (int i = 0; i < n; i++) {
      if (cnt[i] > 1) {
         pair = true;
      }
   }
   if (hcf > 1) {
      cout << "not coprime\n";
   } else if (hcf == 1 && pair) {
      cout << "setwise coprime\n";
   } else {
      cout << "pairwise coprime\n";
   }
}

int main() {
#ifndef ONLINE_JUDGE
   freopen("inp.txt", "r", stdin);      freopen("outp.txt", "w", stdout);
#endif
   ios::sync_with_stdio(false);   cin.tie(NULL);   cout.tie(NULL);

   solve();

   return 0;
}