#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int a, b;
  cin >> a >> b;
  vector<int> ans;
  while (1) {
    ans.push_back(b);
    if (b == 0) break;
    if (b == a) {
      reverse(ans.begin(), ans.end());
      cout << "YES\n";
      cout << ans.size();
      cout << "\n";
      for (__typeof(ans.begin()) it = ans.begin(); it != ans.end(); it++) {
        cout << *it;
        cout << " ";
      }
      return 0;
    }
    if (b % 2 == 0)
      b /= 2;
    else {
      b--;
      if (b % 10 == 0)
        b /= 10;
      else
        break;
    }
  }
  cout << "NO";
  return 0;
}
