#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
const int inf = 1e9 + 10;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define per(i, a, b) for (int i = b - 1; i >= a; i--)
using pint = pair<ll, ll>;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};

int main() {
    int n;
    cin >> n;
    vector<ll> a(n);
    map<int, int> mp;
    bool chk = 0;
    int ans = inf;
    rep(i, 0, n) {
        cin >> a[i];
        a[i] %= 200;
        if (a[i] == 0) {
            chk = 1;
            ans = i;
        }
        mp[a[i]]++;
    }
    if (chk) {
        cout << "Yes\n";
        rep(i, 0, n) {
            if (ans != i) {
                if (ans > i) {
                    cout << "2 " << i + 1 << " " << ans + 1 << "\n";
                    cout << "1 " << i + 1 << "\n";
                    return 0;
                } else {
                    cout << "2 " << ans + 1 << " " << i + 1 << "\n";
                    cout << "1 " << i + 1 << "\n";
                    return 0;
                }
            }
        }
    }
    for (auto p : mp) {
        if (p.second > 1) {
            chk = 1;
            ans = p.first;
            break;
        }
    }
    if (chk) {
        cout << "Yes\n";
        int c = 0;
        rep(i, 0, n) {
            if (ans == a[i]) {
                cout << "1 " << i + 1 << "\n";
                c++;
                if (c == 2) return 0;
            }
        }
    }
    for (ll bit = 1; bit < (1 << n); bit++) {
        vector<int> vec;
        if (__builtin_popcount(bit) == 1) continue;
        ll sum = 0;
        rep(i, 0, n) {
            if (bit & (1 << i)) {
                vec.push_back(i);
                sum += a[i];
            }
        }
        sum %= 200;
        mp[sum]++;
        if (mp[sum] == 2) {
            chk = 1;
            ans = sum;
            break;
        }
    }
    if (chk) {
        cout << "Yes\n";
        int cnt = 0;
        for (ll bit = 1; bit < (1 << n); bit++) {
            vector<int> vec;
            ll sum = 0;
            rep(i, 0, n) {
                if (bit & (1 << i)) {
                    vec.push_back(i);
                    sum += a[i];
                }
            }
            sum %= 200;
            if (sum == ans) {
                cout << __builtin_popcount(bit) << " ";
                for (auto i : vec) cout << i + 1 << " ";
                cout << "\n";
                cnt++;
                if (cnt == 2) return 0;
            }
        }
    } else {
        cout << "No\n";
    }
}
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define INF 1 << 30

// bool solve1(string S) {
//     sort(S.begin(), S.end());
//     for (int i = 8; i <= 999992; i += 8) {
//         auto T = to_string(i);
//         sort(T.begin(), T.end());
//         if (S == T) {
//             return true;
//         }
//     }
//     return false;
// }

bool solve2(string s) {
    if (s.size() == 1) return s == "8";
    if (s.size() == 2) {
        if (stoi(s) % 8 == 0) return 1;
        swap(s[0], s[1]);
        return stoi(s) % 8 == 0;
    }
    vector<int> cnt(10);
    for (char x : s) cnt[x - '0']++;
    for (int i = 112; i < 1000; i += 8) {
        auto c = cnt;
        for (char x : to_string(i)) c[x - '0']--;
        if (all_of(c.begin(), c.end(), [](int x) { return x >= 0; })) return 1;
    }
    return 0;
}

int main() {
    string s; cin >> s;
    bool ans = solve2(s);
    cout << (ans?"Yes":"No") << endl;
}