#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <functional>
#include <list>
#include <numeric>
#include <math.h>
#include <cstdlib>
#include <queue>
#include <iterator>
#include <limits>
#include <string>
#include <sstream>
#include <iomanip>
#include <bitset>
#include <mutex>
#include <condition_variable>
#include <atomic>
#include <stack>
#include <memory>
#include <deque>
#include <string_view>
#include <random>
#include <chrono>
#include <cstring>

using namespace std;

static int my_speed_up = []() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 0; }();
using ll = long long; using ull = unsigned long long;
template<class T> using v = vector<T>;
template<class T> using vv = vector<vector<T>>;
template<class T> using vvv = vector<vector<vector<T>>>;
template<class T> using vvvv = vector<vector<vector<vector<T>>>>;
#define for_b(i, b) for (int i = 0; i < (b); ++i)
#define for_ab(i, a, b) for (int i = a; i < (b); ++i)
#define what_is(x) cout << #x << " = " << x << endl;
#define what_are(x,y) cout << #x << " = " << x << ", " << #y << " = " << y << endl;
#define pad(x) for_b(i, x) cout << "  ";
#define show_1d(___x) cout << #___x << " = "; for (auto& ___num : ___x) cout << ___num << ", "; cout << endl;
#define show_2d(___x) cout << #___x << endl; for (auto& ___row : ___x) { for (auto ___num : ___row) cout << ___num << ", "; cout << endl; }
#define show_3d(___x) cout << #___x << endl; for (auto& ___row : ___x) { for (auto& ___row2 : ___row) { for (auto ___num : ___row2) cout << ___num << ", "; cout << endl; }cout << endl; }

vv<int> d4 = {{1,0},{-1,0},{0,1},{0,-1}};
vv<int> d8 = {{1,0},{-1,0},{0,1},{0,-1},{1,1},{1,-1},{-1,1},{-1,-1}};
bool is_valid_pos(const vv<int>& tb, int x, int y) {
    return x >= 0 && x < tb.size() && y >= 0 && y < tb[0].size();
}


bool get_factors(unordered_set<int>& factors, int num)
{
    v<int> my_factors;
    bool is_go = true;
    while (is_go)
    {
        is_go = false;
        for_ab(i,2,sqrt(num) + 1)
        {
            if (num % i == 0)
            {
                if (factors.find(i) != factors.end()) return false;
                my_factors.push_back(i);
                num /= i;
                is_go = true;
            }
        }
    }
    for (auto factor : my_factors)
        factors.insert(factor);
    return true;
}


int main()
{
    int N;
    cin >> N;
    
    v<int> tb(N);
    for_b(i,N)
        cin >> tb[i];
        
    bool is_pairwise = true;
    unordered_set<int> factors;
    for (auto num : tb)
    {
        if (!get_factors(factors, num))
        {
            is_pairwise = false;
            break;
        }
    }
    if (is_pairwise)
    {
        cout << "pairwise coprime" << endl;
        return 0;
    }
    
    int cur_gcd = tb[0];
    for (auto num : tb)
        cur_gcd = gcd(cur_gcd, num);
        
    if (cur_gcd == 1)
        cout << "setwise coprime" << endl;
    else
        cout << "not coprime" << endl;
    
    return 0;
}
