#include <bits/stdc++.h>
using namespace std;
vector<long long int> ans;
bool flag = true;
void dfs(long long int a, long long int b) {
  if (b <= 0) return;
  ans.push_back(b);
  if (a == b && flag) {
    cout << "YES\n" << ans.size() << endl;
    for (long long int i = ans.size() - 1; i >= 0; i--) {
      cout << ans[i] << ' ';
    }
    flag = false;
    return;
  }
  if (b % 10 == 1) dfs(a, b / 10);
  if (b % 2 == 0) dfs(a, b / 2);
}
int main() {
  long long int a, b;
  cin >> a >> b;
  dfs(a, b);
  if (flag) cout << "NO";
}
