#include <bits/stdc++.h>
using namespace std;
vector<long long> g[1100];
map<long long, bool> visited;
long long a, b;
map<long long, long long> parent;
void dfs(long long v) {
  visited[v] = 1;
  if (v > 1e9 || v == b) {
    return;
  }
  if (!visited[2 * v]) {
    parent[2 * v] = v;
    dfs(2 * v);
  }
  if (!visited[10 * v + 1]) {
    parent[10 * v + 1] = v;
    dfs(10 * v + 1);
  }
}
decltype(0) main() {
  ios::sync_with_stdio(0);
  cin >> a >> b;
  dfs(a);
  if (!visited[b]) {
    cout << "NO\n";
  } else {
    vector<long long> ans;
    long long x = b;
    while (x != parent[a]) {
      ans.push_back(x);
      x = parent[x];
    }
    cout << "YES\n" << (long long)(ans.size()) << "\n";
    for (long long i = (long long)(ans.size()) - 1; i >= 0; i--) {
      cout << ans[i] << " ";
    }
    cout << "\n";
  }
}
