#include <bits/stdc++.h>
using namespace std;
struct node {
  long long int val;
};
bool bfs(long long int a, long long int b, vector<long long int> &arr) {
  queue<node> q;
  node n;
  n.val = a;
  arr.push_back(a);
  q.push(n);
  set<int> visited;
  while (!q.empty()) {
    node t = q.front();
    q.pop();
    if (t.val == b) {
      return true;
    }
    visited.insert(t.val);
    if (t.val * 2 == b || t.val * 10 + 1 == b) {
      return true;
    }
    if (visited.find(t.val * 2) == visited.end()) {
      node k;
      k.val = t.val * 2;
      arr.push_back(k.val);
      q.push(k);
    }
    if (visited.find(t.val * 10 + 1) == visited.end()) {
      node k;
      k.val = t.val * 10 + 1;
      arr.push_back(k.val);
      q.push(k);
    }
    return false;
  }
}
bool dfs(long long int a, long long int b, vector<long long int> &arr) {
  if (a <= b) {
    if (dfs(a * 2, b, arr)) {
      arr.push_back(a);
      return true;
    }
    if (dfs(a * 10 + 1, b, arr)) {
      arr.push_back(a);
      return true;
    }
  }
  if (a == b) {
    arr.push_back(a);
    return true;
  } else
    return false;
}
int main() {
  long long int a, b;
  cin >> a >> b;
  vector<long long int> arr;
  if (dfs(a, b, arr)) {
    cout << "YES" << endl;
    cout << arr.size() << endl;
    reverse(arr.begin(), arr.end());
    for (int i = 0; i < arr.size(); i++) cout << arr[i] << " ";
  } else {
    cout << "NO";
  }
  return 0;
}
