#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const long long N = 1e5 + 5;
void solve() {
  long long a, b;
  cin >> a >> b;
  vector<long long> res;
  while (b > a) {
    res.emplace_back(b);
    if (b % 2 == 0) {
      b = b / 2;
    } else if (b % 10 == 1) {
      b = b / 10;
    } else {
      cout << "NO" << '\n';
      return;
    }
  }
  if (a != b) {
    cout << "NO" << '\n';
  } else {
    res.emplace_back(a);
    reverse(res.begin(), res.end());
    cout << "YES\n" << res.size() << '\n';
    for (auto x : res) cout << x << " ";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t = 1;
  while (t--) {
    solve();
  }
}
