#include <fstream>
#include <vector>
#include <algorithm>
#include <math.h>

using namespace std;

ifstream input("ntcn.inp");
ofstream output("ntcn.out");

long long GCD(long long a, long long b)
{
	return (b == 0) ? a : GCD(b, a % b);
}

void ntcn(vector<long long> &c, int &total)
{
	for (int i = 0; i < c.size() - 1; i++)
	{
		for (int j = i + 1; j < c.size(); j++)
		{
			if (c[i] > 0 && c[j] > 0)
			if (GCD(c[i], c[j]) == 1)
			{
				total++;
			}
		}
	}
}

int main()
{
	int n;
	int total = 0;
	input >> n;
	vector <long long> a(n);
	for (int i = 0; i < n; i++)
	{
		input >> a[i];
	}
	ntcn(a, total);
	output << total;
	input.close();
	output.close();
	return 0;
}