#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
int main() {
  long long a, b;
  cin >> a >> b;
  int flag = 0;
  stack<int> st;
  while (b != a && b != 0) {
    st.push(b);
    if (b % 2 == 1 && b % 10 != 1) {
      flag = 1;
      break;
    } else if (b % 2 == 0)
      b /= 2;
    else if (b % 2 == 1 && b % 10 == 1)
      b /= 10;
  }
  if (flag == 1 || b != a)
    cout << "NO\n";
  else {
    cout << "YES\n" << st.size() + 1 << "\n";
    cout << a << " ";
    while (!st.empty()) {
      cout << st.top() << " ";
      st.pop();
    }
    cout << "\n";
  }
}
