#include <bits/stdc++.h>
#define MAX 60
#define browse for (int i = 0; i < MAX; ++i) for (int j = 0; j < MAX; ++j) for (int ii = 0; ii < MAX; ++ii) for (int jj = 0; jj < MAX; ++jj)

using namespace std;

int n, cnt[MAX][MAX], a, b;
long long y, ans;
long double x;


int main() {
    cin >> n;

    while (n--) {
        cin >> x;

        y = (long long)(x * 1e9 + 0.5);
        a = 0;
        b = 0;

        while (y % 2 == 0) {
            y /= 2;
            ++a;
        }

        while (y % 5 == 0) {
            y /= 5;
            ++b;
        }

        ++cnt[a][b];
    }

    browse
        if (make_pair(i, j) <= make_pair(ii, jj) && i + ii >= 18 && j + jj >= 18) {
            if (i == ii && j == jj)
                ans += (long long) cnt[i][j] * (cnt[i][j] - 1) / 2;
            else
                ans += (long long) cnt[i][j] * cnt[ii][jj];
        }

    cout << ans;
    return 0;
}
// https://atcoder.jp/contests/abc134/tasks/abc134_d
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) FOR(i, 0, n)
#define REPR(i, n) for (int i = n - 1; i >= 0; i--)
#define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLR(obj) (obj).rbegin(), (obj).rend()
#define DIV(a, b) ((a - 1) / b + 1)

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int N;
    cin >> N;
    bitset<200001> bs;
    FOR(i, 1, N + 1) {
        int t;
        cin >> t;
        if (t) {
            bs.set(i);
        }
    }
    bitset<200001> ans;
    int cnt = 0;
    for (int i = N; i >= 1; i--) {
        int sum = 0;
        for (int j = i * 2; j <= N; j += i) {
            sum += ans[j];
        }
        if (sum % 2 != bs[i]) {
            ans.set(i);
            cnt++;
        }
    }
    cout << cnt << "\n";
    for (int i = 1; i <= N; i++) {
        if (ans[i]) {
            cout << i << (--cnt ? " " : "\n");
        }
    }

    return 0;
}
