#include <bits/stdc++.h>
using namespace std;
const int maxn = 10 + 1e6;
const int INF = 1e9 + 10;
long long a, b;
map<long long, int> f;
map<long long, long long> dad;
long long ans[100];
void dfs(long long x, int s) {
  if (x > b) return;
  if (f[2 * x] == 0 || f[2 * x] > s + 1) {
    dad[2 * x] = x;
    f[2 * x] = s + 1;
    dfs(2 * x, s + 1);
  }
  if (f[10 * x + 1] == 0 || f[10 * x + 1] > s + 1) {
    dad[10 * x + 1] = x;
    f[10 * x + 1] = s + 1;
    dfs(10 * x + 1, s + 1);
  }
}
int main() {
  cin >> a >> b;
  dad[a] = a;
  dfs(a, 1);
  if (f[b] == 0)
    cout << "NO";
  else {
    cout << "YES" << endl;
    int l = 0;
    while (dad[b] != b) {
      ans[++l] = b;
      b = dad[b];
    }
    l++;
    ans[l] = a;
    cout << l << endl;
    for (int i = (l), _b = (1); i >= _b; i--) cout << ans[i] << " ";
  }
  return 0;
}
