#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=(a); i<(n); i++)
#define rep2(i,a,n) for (int i=(a); i<=(n); i++)
using ll = long long;
using ld = long double;
using P = pair<int,int>;
int main() {
  string s; cin >> s;
  deque<char> d;
  bool rev = false;
  rep(i,0,s.size()) {
    char c = s.at(i);
    if(c == 'R') rev = !rev;
    else {
      if(rev) d.push_front(c);
      else d.push_back(c);
    }
  }
  if(rev) reverse(d.begin(), d.end());
  string ans = "";
  rep(i,0,d.size()) {
    char c = d[i];
    if(ans.size() != 0 && ans.back() == c) ans.pop_back();
    else ans += c;
  }
  cout << ans << endl;
}
#include <bits/stdc++.h>
// clang-format off
using namespace std; using ll=long long; using ull=unsigned long long; using pll=pair<ll,ll>; const ll INF=4e18;
void print0() {}
template<typename H,typename... T> void print0(H h,T... t){cout<<fixed<<setprecision(15)<<h;print0(t...);}
void print() { print0("\n"); }
template<typename H,typename... T>void print(H h,T... t){print0(h);if(sizeof...(T)>0)print0(" ");print(t...);}
void ioinit() { cout << fixed << setprecision(15); ios_base::sync_with_stdio(0); cin.tie(0); }
// clang-format on

void output(vector<vector<ll>> &use, vector<vector<ll>> &nouse, ll end) {
    ll n = use.size();

    ll j = end;
    vector<ll> ru;
    for (ll i = n - 1; i >= 0; i--) {
        if (use[i][j] != j) {
            ru.push_back(i);
        }
        j = use[i][j];
    }

    j = end;
    vector<ll> rn;
    for (ll i = n - 1; i >= 0; i--) {
        if (nouse[i][j] != j) {
            rn.push_back(i);
        }
        j = nouse[i][j];
    }

    reverse(ru.begin(), ru.end());
    reverse(rn.begin(), rn.end());
    print("Yes");

    print0(ru.size());
    for (ll i = 0; i < (ll)ru.size(); i++) {
        print0(" ", 1 + ru[i]);
    }
    print();

    print0(rn.size());
    for (ll i = 0; i < (ll)rn.size(); i++) {
        print0(" ", 1 + rn[i]);
    }
    print();
}

int main() {
    ioinit();
    ll n;
    cin >> n;
    vector<ll> a(n);
    ll zero = INF;
    for (ll i = 0; i < n; i++) {
        cin >> a[i];
        a[i] = a[i] % 200;
        if (a[i] == 0) {
            zero = i;
        }
    }
    if (zero != INF) {
        print("Yes");
        if (zero == n - 1) {
            print("2 1", (zero + 1));
            print("1 1");
        } else {
            print(2, (zero + 1), (zero + 2));
            print(1, (zero + 2));
        }
        return 0;
    }
    for (ll u = 0; u < n; u++) {
        vector<vector<ll>> use(n, vector<ll>(200, -1));
        vector<vector<ll>> nouse(n, vector<ll>(200, -1));
        if (u == 0) {
            use[0][a[0]] = 0;
            nouse[0][0] = 0;
        } else {
            use[0][0] = 0;
            use[0][a[0]] = 0;
            nouse[0][0] = 0;
            nouse[0][a[0]] = 0;
        }
        for (ll i = 1; i < n; i++) {
            for (ll j = 0; j < 200; j++) {
                ll nj = (j + a[i]) % 200;
                if (use[i - 1][j] >= 0) {
                    use[i][nj] = j;
                    if (u != i) use[i][j] = j;
                }
                if (nouse[i - 1][j] >= 0) {
                    if (u != i) nouse[i][nj] = j;
                    nouse[i][j] = j;
                }
            }
            for (ll j = 1; j < 200; j++) {
                if (use[n - 1][j] >= 0 && nouse[n - 1][j] >= 0) {
                    output(use, nouse, j);
                    return 0;
                }
            }
        }
    }
    print("No");
}
