#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6;
const long long INF = 1e18;
const long long mod = 1e9 + 7;
long long y;
long long n, m;
vector<long long> v;
void rec(long long x) {
  if (x > m) {
    return;
  }
  if (x == m) {
    cout << "YES" << endl;
    y = 1;
  }
  rec(x * 2);
  rec(x * 10 + 1);
  if (y) {
    v.push_back(x);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  rec(n);
  if (!y) {
    cout << "NO";
    return 0;
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  for (int i = 0; i < v.size() - 1; i++) {
    if (v[i] / 2 == v[i + 1] || v[i] / 10 == v[i + 1]) {
      continue;
    }
    v.erase(v.begin() + i + 1);
    i--;
  }
  cout << v.size() << endl;
  for (int i = v.size() - 1; i >= 0; i--) {
    cout << v[i] << " ";
  }
}
