#include <algorithm>
#include <cassert>
#include <iostream>
#include <memory>
#include <numeric>

#include <array>
#include <deque>
#include <map>
#include <set>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#include <cstring>
#include <ostream>
#include <type_traits>
#include <utility>
#include <chrono>
#include <random>

using namespace std;

using uint64 = uint64_t;
using int64 = int64_t;
using uint32 = uint32_t;
using vi = vector<int>;

#define seq(i,a,b) for (int i = (a); i < (b); ++i)
#define rev(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define sz(x) ((int)x.size())
#define all(x) x.begin(), x.end()
#define dbg(x) {cerr << #x << ": " << x << endl;}

int main(int argc, char *argv[])
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  int n; cin >> n;
  vector<int64> A(n);
  for (auto &x : A) cin >> x;

  vector<char> has(1000010);
  bool allcop = true;
  for (auto a : A) {
    for (int i = 2; i*i <= a; ++i) {
      int cnt = 0;
      while (a%i == 0) {
        ++cnt;
        a /= i;
      }
      if (cnt) {
        if (has[i]) {
          allcop = false;
          break;
        }
        has[i] = true;
      }
    }
  }

  int g = A[0];
  seq(i,1,sz(A)) {
    g = gcd(g, A[i]);
  }

  if (allcop) {
    cout << "pairwise coprime\n";
  } else if (g == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
