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