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