#include <bits/stdc++.h>
using namespace std;
const int N = 212345, LG = 21, mod = 1000000007;
const long double eps = 1e-9, pi = acos(-1.0);
queue<int> q;
map<int, int> type, ct;
int main() {
  int a, b;
  scanf("%d", &a), scanf("%d", &b);
  q.push(b), ct[b] = 1;
  bool ans = false;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    if (x == a) {
      ans = true;
      break;
    }
    if (x % 2 == 0 && x / 2 >= a)
      q.push(x / 2), type[x / 2] = 0, ct[x / 2] = ct[x] + 1;
    if (x % 10 == 1 && x / 10 >= a)
      q.push(x / 10), type[x / 10] = 1, ct[x / 10] = ct[x] + 1;
  }
  if (!ans)
    printf("NO\n");
  else {
    printf("YES\n%d\n", ct[a]);
    while (a != b) {
      printf("%d ", a);
      if (type[a] == 0)
        a <<= 1;
      else
        a = a * 10 + 1;
    }
    printf("%d\n", b);
  }
  return 0;
}
