#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  vector<int> ans;
  while (b >= a) {
    ans.push_back(b);
    if (b % 2 == 0) {
      b /= 2;
      continue;
    }
    if (b % 10 == 1) {
      b /= 10;
      continue;
    }
    if (b == a) break;
    cout << "NO";
    return 0;
  }
  int n = ans.size();
  if (ans[n - 1] != a) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  cout << n << endl;
  for (int i = n - 1; i >= 0; i--) cout << ans[i] << ' ';
  return 0;
}
