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