#include<bits/stdc++.h>
using namespace std;
bool istrue(int x, int y) {
int min = x;
if (y < x) {
min = y;
}
for (int i = 2; i <= min; i++) {
if (x % i == 0 && y % i == 0) {
return false;
}
}
return true;
}
int main() {
int n;
while (cin >> n) {
if (n == 0) {
break;
}
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int cnt = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (a[i] < a[j] && istrue(a[i], a[j])) {
cnt++;
}
}
}
cout << cnt << endl;
}
return 0;
}



京公网安备 11010502036488号