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