#include <bits/stdc++.h>
using namespace std;
vector<int64_t> res;
void dfs(int64_t &b, int64_t &a) {
  res.push_back(b);
  if (b < a) {
    cout << "NO\n";
    return;
  }
  if (b == a) {
    return;
  }
  if (b % 10 == 1) {
    b /= 10;
  } else {
    if (b % 2 == 0) {
      b /= 2;
    } else {
      cout << "NO\n";
      return;
    }
  }
  dfs(b, a);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int T = 1;
  for (int test_case = 1; test_case <= T; ++test_case) {
    int64_t a, b;
    cin >> a >> b;
    dfs(b, a);
    if (b == a) {
      cout << "YES\n" << (int)res.size() << "\n";
      for (int i = (int)res.size() - 1; i >= 0; --i) {
        cout << res[i] << " ";
      }
    }
  }
}
