#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  bool feasible = true;
  stack<int> s;
  while (b > a) {
    s.push(b);
    if (b % 2 == 0) {
      b /= 2;
    } else if (b & 1 && (b % 10 == 1))
      b /= 10;
    else {
      feasible = false;
      break;
    }
  }
  if (feasible && b == a) {
    s.push(a);
    cout << "YES\n" << s.size() << "\n";
    while (!s.empty()) {
      cout << s.top() << " ";
      s.pop();
    }
  } else
    cout << "NO" << endl;
}
