#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
ll powk(ll a, ll n = 2){
    ll r = 1;
    for(ll i = 0;i < n;i++){
        r *= a;
    }

    return r;
}


int main()
{
    string n;
    cin >> n;
    ll mc = (ll)n.size(), ans = 0;
    bool f = false;
    for(ll i = 0;i < 1 << ((ll)n.size());i++){
        ll cnt = 0, sum = 0;
        for(ll j = 0;j < (ll)n.size();j++){
           if(i & (1<<j)){
               sum += n[j] - '0';
           }
           else{
               cnt++;
           }
        }
        if(sum % 3 == 0 && mc > cnt){
            f = true;
            mc = cnt;
            ans = cnt;
        }
    }

    if(f){
        cout << ans;
    }
    else{
        cout << -1;
    }

    return 0;
}
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
// #include <atcoder/all> // g++ main.cpp -std=c++17 -I .
using namespace std;
// using namespace atcoder;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
template<class T,class U> inline bool chmin(T&x,U y){if(x>y){x=y;return true;}return false;}
template<class T,class U> inline bool chmax(T&x,U y){if(x<y){x=y;return true;}return false;}
using ll=long long;

const int inf = INT_MAX / 2; const ll INF = 1LL << 60;
const int MOD = 1000000007;

//cout << fixed << setprecision(15) << x << endl;

////////////////////////////////////////////////////////////////////////////////////////////

int main() {
  int n;cin>>n;
  vector<int> a(n);
  for(auto&i:a) {
    cin>>i;
    i %= 200;
  }
  if(n>8) n=8; 

  map<int, int> m;
  int first;
  int second;
  bool can = true;
  for(int i = 1; i < (1<<n); i++) {
    int temp = 0;
    rep(j, n) {
      if(i&(1<<j)) {
        temp += a[j];
        temp %= 200;
      }
    }
    if(m[temp]) {
      first = m[temp];
      second = i;
      break;
    }
    m[temp] = i;
    if(i == (1<<n)-1) can = false;
  }
  if(can) {
    cout << "Yes" << endl;
    cout << __builtin_popcount(first);
    
    rep(i, n) {
      if((first&(1<<i))) cout << " " << i+1;
    }
    cout << endl;
    cout << __builtin_popcount(second);
    rep(i, n) {
      // cout << "a:: " << second << endl;
      if((second&(1<<i))) cout << " " << i+1;
    }
    cout << endl;
  } else {
    cout << "No" << endl;
  }
  



}