#include <bits/stdc++.h>
using namespace std;
const char en = '\n';
constexpr long long INF = 1000000000;
constexpr long long MOD = 1000000007;
void add_edge(vector<vector<int>>& g, int from, int to, bool isDirected) {
  g[from].push_back(to);
  if (!isDirected) g[to].push_back(from);
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  } else
    return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  } else
    return false;
}
struct ModInt {
  ModInt() : mInt(-1){};
  ModInt(long long n) : mInt(n){};
  long long mInt;
  static vector<ModInt> mFact;
  static long long mMod;
  ModInt& operator=(const ModInt& a) {
    mInt = a.mInt;
    return *this;
  }
  ModInt& operator+=(const ModInt& a) {
    mInt += a.mInt;
    mInt %= mMod;
    return *this;
  }
  ModInt& operator-=(const ModInt& a) {
    mInt -= a.mInt;
    if (mInt < 0) mInt += mMod;
    return *this;
  }
  ModInt& operator*=(const ModInt& a) {
    mInt *= a.mInt;
    mInt %= mMod;
    return *this;
  }
  ModInt operator+(const ModInt a) { return ModInt(mInt + a.mInt % mMod); }
  ModInt operator-(const ModInt a) {
    return ModInt(mInt - a.mInt < 0 ? mInt - a.mInt + mMod : mInt - a.mInt);
  }
  ModInt operator*(const ModInt a) { return ModInt(mInt * a.mInt % mMod); }
  ModInt& operator=(const long long& a) {
    mInt = a;
    return *this;
  }
  ModInt& operator+=(const long long& a) {
    mInt += a;
    mInt %= mMod;
    return *this;
  }
  ModInt& operator-=(const long long& a) {
    mInt -= a;
    if (mInt < 0) mInt += mMod;
    return *this;
  }
  ModInt& operator*=(const long long& a) {
    mInt *= a;
    mInt %= mMod;
    return *this;
  }
  ModInt operator+(const long long a) { return ModInt(mInt + a % mMod); }
  ModInt operator-(const long long a) {
    return ModInt(mInt - a < 0 ? mInt - a + mMod : mInt - a);
  }
  ModInt operator*(const long long a) { return ModInt(mInt * a % mMod); }
  ModInt operator++() { return ModInt(++mInt % mMod); }
  ModInt operator--() { return ModInt(++mInt % mMod); }
  bool operator==(ModInt a) { return mInt == a.mInt; }
  bool operator!=(ModInt a) { return mInt != a.mInt; }
  friend ostream& operator<<(ostream& os, const ModInt& n) {
    os << n.mInt;
    return os;
  }
};
long long ModInt::mMod = MOD;
vector<ModInt> ModInt::mFact(1, 1);
map<long long, int> primeFactor(long long n) {
  map<long long, int> ret;
  while (n % 2 == 0) {
    n /= 2;
    ret[2]++;
  }
  int i = 3;
  while (n > 1 && (long long)i * i <= n) {
    while (n % i == 0) {
      n /= i;
      ret[i]++;
    }
    i += 2;
  }
  if (n != 1) ret.insert({n, 1});
  return ret;
}
long long int gcd(long long int a, long long int b) {
  if (a < b) return gcd(b, a);
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  vector<map<long long, int>> aa(n);
  for (int i = 0; i < (n); ++i) {
    aa[i] = primeFactor(a[i]);
  }
  long long sum = a[0];
  bool ok = true;
  for (int i = 0; i < (n); ++i) {
    sum = sum / gcd(sum, a[i]) * a[i];
    if (i + 1 < n && gcd(sum, a[i + 1]) != 1) {
      ok = false;
      break;
    }
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long pro = a[0];
  for (int i = 0; i < (n); ++i) pro = gcd(pro, a[i]);
  if (pro == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
