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