Vasily has a number a, which he wants to turn into a number b. For this purpose, he can do two types of operations:  multiply the current number by 2 (that is, replace the number x by 2·x);  append the digit 1 to the right of current number (that is, replace the number x by 10·x + 1). You need to help Vasily to transform the number a into the number b using only the operations described above, or find that it is impossible.Note that in this task you are not required to minimize the number of operations. It suffices to find any way to transform a into b.

The first line contains two positive integers a and b (1 ≤ a < b ≤ 109) — the number which Vasily has and the number he wants to have.

If there is no way to get b from a, print "NO" (without quotes). Otherwise print three lines. On the first line print "YES" (without quotes). The second line should contain single integer k — the length of the transformation sequence. On the third line print the sequence of transformations x1, x2, ..., xk, where:   x1 should be equal to a,  xk should be equal to b,  xi should be obtained from xi - 1 using any of two described operations (1 < i ≤ k).  If there are multiple answers, print any of them.

using System;
using System.Linq;
using System.Collections.Generic;

namespace codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
            List<int> rez = new List<int>();
            rez.Add(a[1]);
            while (a[1] > a[0])
            {
                if (a[1] % 10 == 1)
                    a[1] /= 10;
                else if (a[1] % 2 == 0)
                    a[1] /= 2;
                else break;
                rez.Add(a[1]);
            }
            rez.Reverse();
            Console.WriteLine(a[1] != a[0] ? "NO" : $"YES\n{rez.Count}\n{string.Join(" ", rez)}"); ;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace CSharp
{
    class _727A
    {
        public static void Main()
        {
            var tokens = Console.ReadLine().Split();

            int a = int.Parse(tokens[0]);
            int b = int.Parse(tokens[1]);

            var set = new SortedSet<int>();

            var queue = new Queue<int>();
            queue.Enqueue(b);

            while (queue.Any())
            {
                int x = queue.Dequeue();
                set.Add(x);

                if (x % 10 == 1 && !set.Contains(x / 10))
                {
                    queue.Enqueue(x / 10);
                }

                if (x % 2 == 0 && !set.Contains(x / 2))
                {
                    queue.Enqueue(x / 2);
                }
            }

            if (set.Contains(a))
            {
                var steps = new List<int>() { a };

                while (a < b)
                {
                    if (set.Contains(2 * a))
                    {
                        a *= 2;
                    }
                    else
                    {
                        a = a * 10 + 1;
                    }

                    steps.Add(a);
                }

                Console.WriteLine("YES");
                Console.WriteLine(steps.Count);
                Console.WriteLine(string.Join(" ", steps));
            }
            else
            {
                Console.WriteLine("NO");
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _727А
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] read = Console.ReadLine().Split(new Char[] { ' ' });
            int a = Convert.ToInt32(read[0]);
            int b = Convert.ToInt32(read[1]);
            List<int> arr = new List<int>();
            arr.Add(b);
            int count = 1;
            //Получить из b число a
            while (true)
            {
                string temp = b.ToString().Substring(b.ToString().Length - 1);
                if (temp == "1" && b.ToString().Length > 1)
                {
                    //число заканчивается на 1
                    b = Convert.ToInt32(b.ToString().Substring(0, b.ToString().Length-1));
                    //получили преобразованное число
                }
                else if(b >= a)
                {
                    //Проверка на чётность
                    if (b % 2 != 0)
                    {
                        Console.WriteLine("NO");
                        break;
                    }
                    b = b / 2;
                }
                else
                {
                    Console.WriteLine("NO");
                    break;
                }
                arr.Add(b); count++;
                if (b == a) {
                    arr.Reverse();
                    string result = "";
                    foreach(int c in arr)
                    {
                        result += c + " ";
                    }
                    Console.WriteLine("YES\n" + (count) + "\n" + result);
                    break;
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static System.Console;

namespace ConsoleApp4
{
    class Program
    {
        static void Main(string[] args)
        {

            string[] s = ReadLine().Split(' ');
            int a = int.Parse(s[0]);
            int b = int.Parse(s[1]);

            WriteLine(ez(a, b) ? "" : "NO");
            Read();
        }

        public static bool ez(int a, int b)
        {
            Stack<int> stack = new Stack<int>();
            int k = 1;
            stack.Push(b);
            do
            {
                if (b % 2 == 0)
                    b /= 2;
                else if (b % 10 == 1)
                    b /= 10;
                else
                    return false;

                if (b < a)
                    return false;

                stack.Push(b);
                k++;

            } while (a < b);

            WriteLine("YES");
            WriteLine(k);
            while (stack.Any())
            {
                Write(stack.Pop() + " ");
            }
            return true;
        }
    }
}

using System;
using System.IO;

class Program
    {
        static void Main(string[] args)
        {
            int n, m, i;
            i = 1;
            string input = Console.ReadLine();
            n = int.Parse(input.Substring(0, input.IndexOf(' ')));
            m = int.Parse(input.Substring(input.IndexOf(' ')+ 1));
            string result = m.ToString();

            while (true)
            {
                if (m < n)
                {
                    result = "NO";
                    break;
                }
                if (m == n)
                {
                    result = "YES\r\n" + i.ToString() + "\r\n" + result;
                    break;
                }
                if (m % 2 == 0)
                {
                    m /= 2;
                    result = (m).ToString() + " " + result;
                    i++;
                    continue;
                }
                if ((m - 1) % 10 == 0)
                {
                    m = (m - 1) / 10;
                    result = (m).ToString() + " " + result;
                    i++;
                    continue;
                }
                result = "NO";
                break;
            }

            Console.WriteLine("{0}", result);
        }
    }

using System;
using System.Collections.Generic;
using System.Linq;

namespace cf727A
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] ab = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

            int a = ab[0]; int b = ab[1];

            List<int> operations = new List<int>();

            while(b > a)
            {
                operations.Add(b);
                if ((b % 2) == 0)
                    b /= 2;
                else if (b.ToString().EndsWith("1"))
                {
                    b = (b - 1) / 10;
                }
                else
                {
                    Console.WriteLine("NO"); return;
                }
            }

            if (b == a)
            {
                Console.WriteLine("YES");
                Console.WriteLine(operations.Count + 1);
                Console.Write(a); Console.Write(' ');
                for (int i = 1; i <= operations.Count; i++)
                {
                    Console.Write(operations[operations.Count-i]); Console.Write(' ');
                }
            }
            else Console.WriteLine("NO");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            double a, b;
            string Result = "NO";
            //int[] posled ;
            List<double> posled = new List<double>();
            //Console.WriteLine("Введите a");
            //a =int.Parse(Console.ReadLine().ToString());
            //Console.WriteLine("Введите b");
            //b = int.Parse(Console.ReadLine().ToString());
            string[] input = Console.ReadLine().Split(' ');
            a = double.Parse(input[0]);
            b = double.Parse(input[1]);
            double tempVar = b;
            while (tempVar > a)
            {
                posled.Add(tempVar);
                if (tempVar % 2 > 0)
                {
                    tempVar = (tempVar - 1) / 10;
                }
                else
                {
                    tempVar = tempVar / 2;
                }

                if (tempVar < 1)
                {
                    Result = "NO";
                    break;
                }
            }
            if (tempVar == a)
            {
                Result = "YES";
            };
            posled.Add(a);

            Console.WriteLine(Result);
            if (Result == "YES")
            {
                Console.WriteLine(posled.Count());
                for (int i = posled.Count() - 1; i >= 0; i--)
                {
                    Console.Write(posled[i] + " ");
                }

            }
            //Console.ReadKey();

        }
    }
}

// Problem: 727A - Transformation: from A to B
// Author: Gusztav Szmolik

using System;
using System.Collections.Generic;
using System.Text;

class TransformationFromAToB
    {
    static int Main ()
        {
        string[] words = ReadSplitLine (2);
        if (words == null)
            return -1;
        uint a;
        if (!UInt32.TryParse (words[0], out a))
            return -1;
        if (a < 1 || a > 999999999)
            return -1;
        uint b;
        if (!UInt32.TryParse (words[1], out b))
            return -1;
        if (b <= a || b > 1000000000)
            return -1;
        Stack<uint> transformations = new Stack<uint> ();
        transformations.Push (b);
        uint transPrev = b;
        bool existSolution = true;
        while (transPrev > a && existSolution)
            {
            if (transPrev%10 == 1)
                transPrev = (transPrev-1)/10;
            else if (transPrev%2 == 0)
                transPrev /= 2;
            else
                {
                existSolution = false;
                continue;
                }
            transformations.Push (transPrev);
            }
        if (existSolution && transPrev == a)
            {
            Console.WriteLine ("YES");
            Console.WriteLine (transformations.Count);
            StringBuilder steps = new StringBuilder ();
            foreach (uint elem in transformations)
                steps.Append (String.Format ("{0} ",elem));
            steps.Remove (steps.Length-1,1);
            Console.WriteLine (steps);
            }
        else
            Console.WriteLine ("NO");
        return 0;
        }

    static string[] ReadSplitLine (uint numWordNeed)
        {
        string line = Console.ReadLine ();
        if (line == null)
            return null;
        char[] delims = new char[2] {' ', '\t'};
        string[] words = line.Split (delims,StringSplitOptions.RemoveEmptyEntries);
        return (words.Length == numWordNeed ? words : null);
        }
    }

using System;
using System.Collections.Generic;

namespace Algorithm
{
    class Program
    {
        static void Main()
        {
           int[] nums = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            Stack<int> seq = new Stack<int>();
            seq.Push(nums[1]);
            while (nums[1] > nums[0])
            {
                if ((nums[1] & 1) == 1)
                {
                    if (nums[1] % 10 == 1)
                        nums[1] /= 10;
                    else
                    {
                        Console.WriteLine("NO");
                        return;
                    }
                }
                else
                {
                    nums[1] >>= 1;
                }
                seq.Push(nums[1]);
            }

            if (nums[1] < nums[0])
                Console.WriteLine("NO");
            else
            {
                if (seq.Count == 1)
                    seq.Push(nums[0]);
                Console.WriteLine("YES");
                Console.WriteLine(seq.Count);
                foreach (var item in seq)
                {
                    Console.Write(item + " ");
                }
            }

        }

    }
}

using System;
using System.Collections.Generic;

namespace Algorithm
{
    class Program
    {
        static void Main()
        {
           int[] nums = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            List<int> seq = new List<int>();
            seq.Add(nums[1]);
           while (nums[1] > nums[0]){
                if((nums[1] & 1) == 1)
                {
                    if (nums[1] % 10 == 1)
                        nums[1] /= 10;
                    else
                    {
                        Console.WriteLine("NO");
                        return;
                    }
                }
                else
                {
                    nums[1] >>= 1;
                }
                seq.Add(nums[1]);
            }

            if(nums[1] < nums[0])
                Console.WriteLine("NO");
            else
            {
                if (seq.Count == 1)
                    seq.Add(nums[0]);
                Console.WriteLine("YES");
                Console.WriteLine(seq.Count);
                for (int i = seq.Count-1; i >= 0; i--)
                {
                    Console.Write(seq[i] + " ");
                }
            }

        }

    }
}

using System;
using System.Collections.Generic;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			var input = Console.ReadLine().Split(' ');
			long a = long.Parse(input[0]), b = long.Parse(input[1]);
			var c = b;
			var seq = new List<long> { c };
			while (true)
			{
				if (c<=a) break;
				if (c%2 > 0)
				{
					if (c%10 != 1) break;
					c /= 10;
				}
				else c /= 2;
				seq.Insert(0, c);
			}
			if (c != a)
				Console.WriteLine("NO");
			else
			{
				Console.WriteLine("YES");
				Console.WriteLine(seq.Count);
				Console.WriteLine(string.Join(" ",seq));
			}
		}
	}
}

using System;
using System.Collections.Generic;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			string[] input = Console.ReadLine().Split(' ');
			long a = long.Parse(input[0]), b = long.Parse(input[1]);
			long c = b;
			var seq = new List<long> { c };
			while (true)
			{
				if (c<=a) break;
				if (c%2 > 0)
				{
					if ((c - 1)%10 > 0) break;
					c = (c - 1)/10;
				}
				else c = c/2;
				seq.Insert(0, c);
			}
			if (c != a)
				Console.WriteLine("NO");
			else
			{
				Console.WriteLine("YES");
				Console.WriteLine(seq.Count);
				Console.WriteLine(string.Join(" ",seq));
			}
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OlympPrepSharp
{
    public class Node
    {
        public int Val;
        public Node Left, Right;

        public Node(int val)
        {
            Val = val;
            Left = null;
            Right = null;
        }

        public void BuildTree()
        {
            if(Val == 0) return;
            if (Val%2 == 0)
            {
                Left = new Node(Val/2);
                Left.BuildTree();
            }
            else Left = null;
            if ((Val - 1)%10 == 0)
            {
                Right = new Node((Val - 1)/10);
                Right.BuildTree();
            }
            else Right = null;
        }

        public List<int> DFS(int lookFor, List<int> prev)
        {
            List<int> cur = new List<int>(prev);
            cur.Add(Val);
            if (Val == lookFor) return cur;
            if (Left != null)
            {
                List<int> left = Left.DFS(lookFor, cur);
                if (left[0] != -1) return left;
            }
            if (Right != null)
            {
                List<int> right = Right.DFS(lookFor, cur);
                if (right[0] != -1) return right;
            }
            return new List<int> {-1};

        }
    }

    class Program
    {

        static void Main(string[] args)
        {
            try
            {

                int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
                Node root = new Node(input[1]);
                root.BuildTree();
                List<int> result = root.DFS(input[0], new List<int>());
                if (result[0] == -1) Console.WriteLine("NO");
                else
                {
                    Console.WriteLine("YES");
                    Console.WriteLine(result.Count);
                    for (int i = result.Count - 1; i >= 0; i--)
                    {
                        Console.Write(result[i] + " ");
                    }
                    Console.WriteLine();
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }

        static void PrintCol<T>(IEnumerable<T> col)
        {
            foreach (var i in col)
            {
                Console.Write(i + " ");
            }
            Console.WriteLine();
        }
    }
}

using System;
using System.Collections.Generic;
class Program
    {
        public static void Main(string[] args)
        {
            int a, b;
            {
                string[] input = Console.In.ReadLine().Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
                a = int.Parse(input[0]);
                b = int.Parse(input[1]);
            }
            {
                int temp;
                List<int> data = new List<int>();
                data.Add(b);
                while (a < b)
                {
                    if ((temp = b % 10) == 1)
                        b = (b -= 1) / 10;
                    else if (temp % 2 == 0)
                        b /= 2;
                    else break;
                    data.Add(b);
                }
                if (a!=b) Console.WriteLine("NO");
                else
                {
                    Console.WriteLine("YES\n{0}", data.Count);
                    for (int i = data.Count - 1; i > 0; --i)
                        Console.Write("{0} ", data[i]);
                    Console.WriteLine(data[0]);
                }
            }
        }
    }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace А
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            int a = int.Parse(s[0]);
            int b = int.Parse(s[1]);

            Stack<int> stack = new Stack<int>();
            stack.Push(b);
            while (true)
            {
                if (b < a)
                {
                    Console.WriteLine("NO");
                    return;
                }
                if (b == a)
                {
                    //вывод
                    Console.WriteLine("YES");
                    int k = stack.Count;
                    Console.WriteLine(k);
                    for (int i = 0; i < k; i++)
                    {
                        Console.Write("{0} ", stack.Pop());
                    }
                    return;
                }
                if ((b % 2) != 0)
                {
                    if ((b % 10) != 1)
                    {
                        Console.WriteLine("NO");
                        return;
                    }
                    else
                    {
                        b -= 1;
                        b /= 10;
                        stack.Push(b);
                    }
                }
                else
                {
                    b /= 2;
                    stack.Push(b);
                }
            }
        }
    }
}

#undef DEBUG

using System;

namespace _1
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            decimal a = Convert.ToDecimal(str.Split(' ')[0]);
            decimal b = Convert.ToDecimal(str.Split(' ')[1]);
            decimal tmp = b;
            decimal[] nums = { b };
            while (tmp!=a)
            {
                if (tmp < a)
                {
                    Console.WriteLine("NO");
                    goto end;
                }
                Array.Resize(ref nums, nums.Length + 1);
                if (tmp % 2 == 0)
                {
                    tmp = tmp / 2;
                }
               else
                {
                    tmp = (tmp - 1) / 10;
                }
                nums[nums.Length - 1] = tmp;
            }
            Console.WriteLine("YES");
            Console.WriteLine(nums.Length);
            string stmp = "";
            for (int i = nums.Length - 1; i >= 0; i--)
            {
                stmp += nums[i] + " ";
            }
            stmp.TrimEnd();
            Console.WriteLine(stmp);
        end:;
#if DEBUG
            Console.ReadKey();
#endif
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            List<int> b = new List<int>();
            b.Add(a[1]);
            while (a[1] > a[0])
            {
                if (a[1] % 2 == 1)
                {
                    a[1]--;
                    if (a[1] % 10 != 0)
                    {
                        Console.WriteLine("NO");
                        return;
                    }
                    else
                    {
                        a[1] /= 10;
                        b.Add(a[1]);
                    }
                }
                else
                {
                    a[1] /= 2;
                    b.Add(a[1]);
                }
            }
            if (a[1] == a[0])
            {
                Console.WriteLine("YES");
                Console.WriteLine(b.Count);
                for (int i = b.Count - 1; i >= 0; i--)
                {
                    Console.Write(b[i] + " ");
                }
            }
            else
            {
                Console.WriteLine("NO");
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace Transformation_from_A_to_B
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            int a = Next();
            int b = Next();

            var s = new Stack<int>();
            s.Push(b);

            do
            {
                if (b%10 == 1)
                {
                    b /= 10;
                }
                else if (b%2 == 0)
                {
                    b /= 2;
                }
                else
                {
                    break;
                }
                s.Push(b);
            } while (b > a);

            if (a == b)
            {
                writer.WriteLine("YES");
                writer.WriteLine(s.Count);
                foreach (int i in s)
                {
                    writer.Write(i);
                    writer.Write(' ');
                }
            }
            else
            {
                writer.WriteLine("NO");
            }

            writer.Flush();
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _727A
{
    class Program
    {
        static void Main()
        {
            string[] input = Console.ReadLine().Split(' ');
            int a = int.Parse(input[0]), b = int.Parse(input[1]);
            var sequence = new List<int>();
            sequence.Add(b);

            while (true)
            {
                var last = sequence[sequence.Count - 1];
                if (last == a)
                {
                    Console.WriteLine("YES");
                    sequence.Reverse();
                    Console.WriteLine(sequence.Count);
                    Console.WriteLine(string.Join(" ", sequence));
                    break;
                }
                else if (last < a)
                {
                    Console.WriteLine("NO");
                    break;
                }

                if (last % 2 == 0)
                {
                    sequence.Add(last / 2);
                }
                else if (last % 10 == 1)
                {
                    sequence.Add((last - 1) / 10);
                }
                else
                {
                    Console.WriteLine("NO");
                    break;
                }
            }
            //Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace TaskA
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ');
            int a = int.Parse(input[0]);
            int b = int.Parse(input[1]);
            var result = new Stack<int>();
            result.Push(b);
            bool found = false;

            while (b > a)
            {
                if (b % 2 == 0)
                    b /= 2;
                else if (b > 9 && b%10 == 1)
                    b /= 10;
                else
                    break;

                result.Push(b);

                if (b == a)
                    found = true;
            }

            if (found)
            {
                Console.WriteLine("YES");
                Console.WriteLine(result.Count);
                while (result.Count > 0)
                {
                    if (result.Count > 1)
                        Console.Write("{0} ", result.Pop());
                    else
                        Console.Write(result.Pop());
                }
            }
            else
                Console.WriteLine("NO");

            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApplication3
{
    class Program
    {

        static List<int> ans = new List<int>();
        static void Main()
        {
            string[] s = Console.ReadLine().Split();
            int a = int.Parse(s[0]);
            int b = int.Parse(s[1]);
            ans.Add(b);
            while((b>=a) || ((b % 10) ==1) || ((b % 2) == 0))
            {
                if (b == a)
                {
                    Console.WriteLine("YES");
                    Console.WriteLine(ans.Count);
                    for (int i = 0; i < ans.Count; i++)
                    {
                        Console.Write(ans[i] + " ");

                    }
                    Environment.Exit(0);
                }
                else if ((b % 10) == 1)
                {
                    b = (b - 1) / 10;
                    ans.Insert(0, b);
                }
                else if ((b % 2) == 0)
                {
                    b = b / 2;
                    ans.Insert(0, b);

                }
                else break;
                if (b < a) break;

            }
            Console.WriteLine("NO");

        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

namespace CF317
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var sr = new InputReader(Console.In);
            //var sr = new InputReader(new StreamReader("input.txt"));
            var task = new Task();
            using (var sw = Console.Out)
            //using (var sw = new StreamWriter("output.txt"))
            {
                task.Solve(sr, sw);
                //Console.ReadKey();
            }
        }
    }

    internal class Task
    {
        public void Solve(InputReader sr, TextWriter sw)
        {
            var input = sr.ReadArray(Int32.Parse);
            var a = input[0];
            var b = input[1];
            var list = new List<int>();
            while (true) {
                list.Add(b);
                if (b == a)
                {
                    sw.WriteLine("YES");
                    break;
                }
                if (b < a)
                {
                    sw.WriteLine("NO");
                    return;
                }
                if (b%2 == 0) {
                    b /= 2;
                }
                else {
                    if (b % 10 != 1) {
                        sw.WriteLine("NO");
                        return;
                    }
                    b /= 10;
                }
            }
            list.Reverse();
            var sb = new StringBuilder();
            foreach (var i in list) {
                sb.Append(i + " ");
            }

            sw.WriteLine(list.Count);
            sw.Write(sb);
        }
    }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(NextString());
    }

    public long NextInt64()
    {
        return Int64.Parse(NextString());
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();
            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}

using System;
using System.Collections.Generic;

namespace ConsoleApplication1 {
    class Program {
        static void Main(string[] args) {
            string[] tokens = Console.ReadLine().Split();

            int n = int.Parse(tokens[0]);
            int m = int.Parse(tokens[1]);

            var res = new List<int>();
            res.Add(m);
            while (m > n) {
                if (m%10 == 1) {
                    m -= 1;
                    m /= 10;
                } else if (m%2 != 0) {
                    Console.WriteLine("NO");
                    return;
                } else {
                    m /= 2;
                }
                res.Add(m);
            }
            if (m == n) {
                Console.WriteLine("YES");
                Console.WriteLine(res.Count);
                for (int i = res.Count - 1; i >= 0; --i) {
                    Console.Write(res[i] + " ");
                }
            } else {
                Console.WriteLine("NO");
            }
        }
    }
}

using System;
using System.Collections.Generic;

class Program
{
    static List<ulong> l = new List<ulong>();
    static void Main(string[] args)
    {
        string[] str = Console.ReadLine().Split(' ');
        ulong a = Convert.ToUInt64(str[0]);
        ulong b = Convert.ToUInt64(str[1]);
        if (Func(a, b))
        {
            Console.WriteLine("YES");
            Console.WriteLine(l.Count);
            for (int i = l.Count - 1; i >= 0; i--)
            {
                if (i != 0)
                    Console.Write(l[i] + " ");
                else Console.Write(l[i]);
            }
        }
        else Console.WriteLine("NO");
        // Console.ReadKey();
    }
    public static bool Func(ulong a, ulong b)
    {
        if (a != b && a < b)
        {
            if (Func(a * 2, b) || Func(a * 10 + 1, b))
            {
                l.Add(a);
                return true;
            }
        }
        else
        {
            if (a == b)
            {
                l.Add(a);
                return true;
            }
            else return false;
        }
        return false;
    }

}

namespace Play.Codeforces
{
    using System;
    using System.Collections.Generic;

    class Program
    {
        const long mod = 1000000007;

        static void Main(string[] args)
        {
            int[] ab = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            LinkedList<long> path = new LinkedList<long>();
            var found = Transform(ab[0], ab[1], path);

            if (found == false)
            {
                Console.WriteLine("NO");
            }
            else
            {
                path.AddFirst(ab[0]);

                Console.WriteLine("YES");
                Console.WriteLine(path.Count);
                Console.WriteLine(string.Join(" ", path));
            }

        }

        static bool Transform(long a, long b, LinkedList<long> path)
        {
            if (a == b)
                return true;

            if (a > b)
                return false;

            if (Transform(2*a, b, path))
            {
                path.AddFirst(2*a);
                return true;
            }
            if (Transform(10 * a + 1, b, path))
            {
                path.AddFirst(10 * a + 1);
                return true;
            }

            return false;
        }
    }
}

using System;

public class Test
{
    public static void Main()
    {
        string[] Arr = Console.ReadLine().Split(' ');

        int a = int.Parse(Arr[0]), b = int.Parse(Arr[1]);
        int count = 0;
        string str = "";
        bool c = false;

        for (int i = 0; ; i++)
        {
            if (a < b)
            {
                if (b % 2 == 0)
                {
                    count++;
                    str = Convert.ToString(b) + " " + str;
                    b /= 2;

                }
                else if (b % 10 == 1)
                {
                    str = Convert.ToString(b) + " " + str;
                    b = b / 10;
                    count++;
                }
                else break;

                if (b == a)
                {
                    str = str = Convert.ToString(a) + " " + str;
                    c = true;
                    count++;
                    break;

                }
            }
            else break;
        }

        if (c)
        {
            Console.WriteLine("YES");
            Console.WriteLine(count);
            Console.WriteLine(str);
        }
        else Console.WriteLine("NO");
    }

}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace SevskiiOlymp
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int a = int.Parse(s.Split(' ')[0]);
            int b = int.Parse(s.Split(' ')[1]);
            List<int> l = check(a, b, new List<int>());
            if (l.Count > 0)
            {
                Console.WriteLine("YES");
                Console.WriteLine(l.Count + 1);
                Console.Write(a+ " ");
                for (int i = l.Count-1; i >= 0; i--)
                    Console.Write(l[i] + " ");
            }
            else
                Console.WriteLine("NO");
            Console.WriteLine();
            Console.ReadLine();
        }
        static public List<int> check(int a,int b,List<int> i)
        {
            try
            {
                if (b < a)
                    return new List<int>();
                if (b == a)
                    return i;
                int r1 = -1, r2 = -1;
                i.Add(b);
                if (b % 2 == 0)
                {
                    List<int> t = check(a, b / 2, i);
                    r1 = t[t.Count - 1];
                }
                if (b % 10 == 1)
                {
                    List<int> t = check(a, b / 10, i);
                    r2 = t[t.Count - 1];
                }
                if (r1 != -1)
                    return i;
                if (r2 != -1)
                    return i;
                return new List<int>();
            }
            catch (Exception)
            {
                return new List<int>();
            }
        }
        public void tmp()
        {
            List<string> prices = new List<string>();
            string s = Console.ReadLine();
            foreach (Match m in Regex.Matches(s, @"[^\d]+([^a-z]+)"))
            {
                prices.Add(m.Groups[1].Value);
            }
            int result = 0;

            foreach (string p in prices)
            {
                if (Regex.IsMatch(p, @"\.\d\d$"))
                {
                    result += int.Parse((p.Substring(0, p.Length - 3).Replace(".", ""))) * 100 + int.Parse(p.Substring(p.Length - 2, 2));
                }
                else
                {
                    result += int.Parse((p.Replace(".", ""))) * 100;
                }
            }
            string resultStr = result.ToString();
            if (resultStr.Length == 1)
                resultStr = "00" + resultStr;
            if (resultStr.Length == 2)
                resultStr = "0" + resultStr;

            if (result % 100 == 0)
            {
                for (int i = 0; i < resultStr.Length - 2; i++)
                {
                    Console.Write(resultStr[i]);
                    if ((resultStr.Length - i) % 3 == 0 && i != resultStr.Length - 3)
                        Console.Write(".");
                }
            }
            else
            {
                for (int i = 0; i < resultStr.Length - 2; i++)
                {
                    Console.Write(resultStr[i]);
                    if ((resultStr.Length - i - 3) % 3 == 0 && i != resultStr.Length - 3)
                        Console.Write(".");
                }
                Console.Write("." + resultStr.Substring(resultStr.Length - 2, 2));
            }
            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace TaskA
{
    class Program
    {
        private static readonly Stack<long> Stack = new Stack<long>();
        private static long a;
        private static long b;

        private static bool AtoB()
        {
            if (a > b) return false;
            Stack.Push(a);
            if (a == b) return true;
            var temp = a;
            a = a * 10 + 1;
            var result = AtoB();
            if (result) return true;
            a = temp * 2;
            result = AtoB();
            if (result) return true;
            a = temp;
            Stack.Pop();
            return false;
        }

        static void Main()
        {
            var ab = Console.ReadLine().Split(' ').ToArray();
            a = long.Parse(ab[0]);
            b = long.Parse(ab[1]);
            if (AtoB())
            {
                Console.WriteLine("YES");
                Console.WriteLine(Stack.Count);
                foreach (var temp in Stack.Reverse())
                    Console.Write("{0} ", temp);
            }
            else Console.WriteLine("NO");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
	class Program
	{
		static void Main(string[] args)
		{
			string s = Console.ReadLine();
			string[] sLst = s.Split(' ');
			Stack<Int64> sNum = new Stack<Int64>();
			//try
			//{
				Int64 numA = Convert.ToInt64(sLst[0].Trim());
				Int64 numB = Convert.ToInt64(sLst[1].Trim());

				if ( numB <= numA)
				{
					Console.Write("NO");
					return;
				}
				sNum.Push(numB);
				while (numA < numB)
				{
					if (numB % 10 == 1)
						numB = (numB - 1) / 10;
					else if (numB % 2 == 1)
					{
						Console.Write("NO");
						return;
					}
					else
					{
						numB = numB / 2;
					}
					sNum.Push(numB);
				}
				if ( numA > numB)
				{
					Console.Write("NO");
					return;
				}
				Console.WriteLine("YES");
				Console.WriteLine(sNum.Count);
				while( sNum.Count > 0)
				{
					Console.Write(sNum.Pop());
					if (sNum.Count > 0) Console.Write(" ");
				}
			//}
			//catch(Exception ex)
			//{
			//	Console.Write("NO");
			//}
			//finally
			//{
			//	Console.ReadLine();
			//}
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
	class Program
	{
		static void Main(string[] args)
		{
			string s = Console.ReadLine();
			string[] sLst = s.Split(' ');
			Stack<Int64> sNum = new Stack<Int64>();
			try
			{
				Int64 numA = Convert.ToInt64(sLst[0].Trim());
				Int64 numB = Convert.ToInt64(sLst[1].Trim());

				if ( numB <= numA)
				{
					Console.Write("NO");
					return;
				}
				sNum.Push(numB);
				while (numA < numB)
				{
					if (numB % 10 == 1)
						numB = (numB - 1) / 10;
					else if (numB % 2 == 1)
					{
						Console.Write("NO");
						return;
					}
					else
					{
						numB = numB / 2;
					}
					sNum.Push(numB);
				}
				if ( numA > numB)
				{
					Console.Write("NO");
					return;
				}
				Console.WriteLine("YES");
				Console.WriteLine(sNum.Count);
				while( sNum.Count > 0)
				{
					Console.Write(sNum.Pop());
					if (sNum.Count > 0) Console.Write(" ");
				}
			}
			catch(Exception ex)
			{
				Console.Write("NO");
			}
			//finally
			//{
			//	Console.ReadLine();
			//}
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Задачи
{
    class Program
    {
        static void Main(string[] args)
        {
            string instring = Console.ReadLine(), outstring = "";
            int x1 = Convert.ToInt32(instring.Substring(0, instring.LastIndexOf(' '))); int a1 = x1, k = 1, f = 0;
            int x2 = Convert.ToInt32(instring.Substring(instring.LastIndexOf(' '), instring.Length - instring.LastIndexOf(' '))); int b1 = x2;
            while (k != 0)
            {

                if ((b1 % 2 == 0) && (b1 != 0) && (b1 != a1))
                {
                    k = 13;
                    b1 = b1 / 2;
                    outstring = Convert.ToString(b1) + " " + outstring;
                }
                else if ((b1 % 10 == 1) && (b1 != 1) && (b1 != a1))
                {
                    k = 1;
                    b1 = b1 / 10;
                    outstring = Convert.ToString(b1) + " " + outstring;
                }
                else k = 0;
                f++;
            }
            outstring = outstring + Convert.ToString(x2);
            if (b1 == a1) Console.WriteLine("YES\n{0}\n{1}", f, outstring);
            else Console.WriteLine("NO");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Div._2_A.Transformation_from_A_to_B
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            long a = long.Parse(s[0]);
            long b = long.Parse(s[1]);
            List<long> list = new List<long>();
            bool right = false;
            while (b >= a)
            {
                list.Add(b);
                if (a == b)
                {
                    right = true;
                    break;
                }
                if (b % 2 == 0)
                {
                    b /= 2;
                }
                else if(b > 10 && b % 10 == 1)
                {
                    b /= 10;
                }
                else
                {
                    right = false;
                    break;
                }
            }
            if (right)
            {
                Console.WriteLine("YES");
                Console.WriteLine(list.Count);
                for (int i = list.Count-1; i >= 0; i--)
                {
                    Console.Write(list[i] + " ");
                }
            }
            else
                Console.WriteLine("NO");
            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Div._2_A.Transformation_from_A_to_B
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            long a = long.Parse(s[0]);
            long b = long.Parse(s[1]);
            List<long> list = new List<long>();

            while (b > a)
            {
                list.Add(b);

                if (b % 2 == 0)
                    b /= 2;
                else if(b > 10 && b % 10 == 1)
                    b /= 10;
                else
                    break;
            }
            if (a == b)
            {
                list.Add(b);
                Console.WriteLine("YES");
                Console.WriteLine(list.Count);
                for (int i = list.Count-1; i >= 0; i--)
                {
                    Console.Write(list[i] + " ");
                }
            }
            else
                Console.WriteLine("NO");
            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
    public void Solve()
    {
        int a = ReadInt();
        int b = ReadInt();

        var ans = new List<int> { b };
        while (b > a)
        {
            if (b % 10 == 1)
                b /= 10;
            else if (b % 2 == 0)
                b /= 2;
            else
                break;
            ans.Add(b);
        }

        if (a == b)
        {
            ans.Reverse();
            Write("YES");
            Write(ans.Count);
            WriteArray(ans);
        }
        else
            Write("NO");
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solver().Solve();
            //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
#if DEBUG
            Console.WriteLine(ex);
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array)writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }
    #endregion
}

using System;
using System.Collections.Generic;

namespace CCS
{
    class Program
    {
        static List<int> s = new List<int>();

        static bool Rec(int a, int b)
        {
            if (a == b)
            {
                s.Add(b);
                return true;
            }
            else if (b > a)
            {
                bool w = false;

                if (b % 2 == 0)
                {
                    w = Rec(a, b / 2);
                    if (w)
                        s.Add(b);
                    return w;
                }
                if ((b - 1) % 10 == 0)
                {
                    w = Rec(a, (b - 1) / 10);
                    if (w)
                        s.Add(b);
                    return w;
                }
                return false;
            }
            return false;
        }

        static void Main()
        {
            string[] input = Console.ReadLine().Split(' ');
            if (Rec(int.Parse(input[0]), int.Parse(input[1])))
            {
                Console.WriteLine("YES");
                Console.WriteLine(s.Count.ToString());
                for (int i = 0; i < s.Count; i++)
                    Console.Write(s[i] + " ");
                return;
            }
            Console.Write("NO");
        }
    }
}

using System;
using System.Linq;
using System.Collections.Generic;

class Solution
{
	static void Main(string[] args)
	{
		int[] nums = Console.ReadLine ().Split (' ').Select (int.Parse).ToArray ();
		long a = nums [0];
		long b = nums [1];
		Dictionary<long, long> path = new Dictionary<long, long> ();
		path.Add (a, 0);
		HashSet<long> front = new HashSet<long> { a };
		while (front.Count > 0 && !front.Contains (b)) {
			HashSet<long> newFront = new HashSet<long> ();
			foreach (long l in front) {
				if (!path.ContainsKey (2 * l) && 2 * l <= b) {
					path [2 * l] = l;
					newFront.Add (2 * l);
				}
				if (!path.ContainsKey (10 * l + 1) && 10 * l + 1 <= b) {
					path [10 * l + 1] = l;
					newFront.Add (10 * l + 1);
				}
			}
			front = newFront;
		}
		if (front.Contains (b)) {
			Console.WriteLine ("YES");
			List<long> backtrack = new List<long> {b};
			while (path [b] != 0) {
				b = path [b];
				backtrack.Insert (0, b);
			}
			Console.WriteLine (backtrack.Count);
			Console.WriteLine (string.Join (" ", backtrack));
		}else
			Console.WriteLine ("NO");
	}
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace Competitions
{
    class CF1A
    {
        static void Main(string[] args)
        {
            var arr = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            int a = arr[0];
            int b = arr[1];

            var list = new List<int>();
            list.Add(b);
            while (true)
            {
                if (b == a)
                {
                    Console.WriteLine("YES");
                    Console.WriteLine(list.Count);
                    list.Reverse();
                    Console.WriteLine(string.Join(" ", list));
                    return;
                }
                if (b < a) break;
                if ((b % 10) == 1)
                {
                    b -= 1;
                    b /= 10;
                    list.Add(b);
                }
                else if (b%2 == 0)
                {
                    b /= 2;
                    list.Add(b);
                }
                else break;
            }

            Console.WriteLine("NO");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Olmp1
{
    class Program
    {
        static void Main(string[] args)
        {
            //x * 2 | x + '1'
            int from, to;
            string[] split = null;
            do
            {
                split = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            } while ((split.Length < 2) || !int.TryParse(split[0], out from) || !int.TryParse(split[1], out to));
            List<int> step = new List<int>();
            List<int> steps = new List<int>();
            step.Add(to);
            while (to != from && to > from)
            {
                if (to.ToString().Last() == '1')
                {
                    to = Convert.ToInt32(to.ToString().Remove(to.ToString().Length - 1));
                    step.Add(to);
                }
                else if (Math.IEEERemainder((double)to, 2) == 0)
                {
                    to = to / 2;
                    step.Add(to);
                }
                else
                {
                    break;
                }
            }
            if (to == from)
            {
                Console.WriteLine("YES");
                Console.WriteLine(step.Count);
                for (int i = step.Count - 1; i >= 0; i--)
                {
                    if (i != 0)
                    {
                        Console.Write(step[i] + " ");
                    }
                    else
                    {
                        Console.Write(step[i]);
                    }
                }
            }
            else
            {
                Console.WriteLine("NO");
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;

namespace Codeforces
{
    class A
    {
        private static ThreadStart s_threadStart = new A().Go;

        private void Go()
        {
            long a = GetInt();
            long b = GetInt();
            List<long> ans = new List<long>();
            while (b > a)
            {
                ans.Add(b);
                if (b % 10 == 1)
                    b = (b - 1) / 10;
                else if (b % 2 == 0)
                    b /= 2;
                else
                {
                    Wl("NO");
                    return;
                }
            }
            ans.Add(b);

            if (b < a)
            {
                Wl("NO");
                return;
            }

            ans.Reverse();
            Wl("YES");
            Wl(ans.Count);
            Wl(string.Join(" ", ans.Select(x => x.ToString())));
        }

        #region Template

        private static StringBuilder output = new StringBuilder();

        public static void Main(string[] args)
        {
            System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();
            output.Length = 0;
            Thread main = new Thread(new ThreadStart(s_threadStart), 512 * 1024 * 1024);
            timer.Start();
            main.Start();
            main.Join();
            Console.Write(output);
            timer.Stop();
            Console.Error.WriteLine(timer.ElapsedMilliseconds);
        }

        private static IEnumerator<string> ioEnum;
        private static string GetString()
        {
            do
            {
                while (ioEnum == null || !ioEnum.MoveNext())
                {
                    ioEnum = Console.ReadLine().Split().AsEnumerable().GetEnumerator();
                }
            } while (string.IsNullOrEmpty(ioEnum.Current));

            return ioEnum.Current;
        }

        private static int GetInt()
        {
            return int.Parse(GetString());
        }

        private static long GetLong()
        {
            return long.Parse(GetString());
        }

        private static double GetDouble()
        {
            return double.Parse(GetString());
        }

        private static List<int> GetIntArr(int n)
        {
            List<int> ret = new List<int>(n);
            for (int i = 0; i < n; i++)
            {
                ret.Add(GetInt());
            }
            return ret;
        }

        private static void Wl<T>(T o)
        {
            W(o);
            output.Append(Console.Out.NewLine);
        }

        private static void Wl<T>(IEnumerable<T> enumerable)
        {
            W(enumerable);
            output.Append(Console.Out.NewLine);
        }

        private static void W<T>(T o)
        {
            if (o is double)
            {
                Wd((o as double?).Value, "");
            }
            else if (o is float)
            {
                Wd((o as float?).Value, "");
            }
            else
                output.Append(o.ToString());
        }

        private static void W<T>(IEnumerable<T> enumerable)
        {
            W(string.Join(" ", enumerable.Select(e => e.ToString()).ToArray()));
        }

        private static void Wd(double d, string format)
        {
            W(d.ToString(format, CultureInfo.InvariantCulture));
        }

        #endregion
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CFA
{
    class Program
    {
        static Stack<int> steps = new Stack<int>();

        static bool rec(int a, int b)
        {
            if (a == b)
            {
                steps.Push(a);
                return true;
            }
            if (a % 2 == 0 && a / 2 != 0)
            {
                steps.Push(a);
                return rec(a / 2, b);
            }
            if (a % 10 == 1)
            {
                steps.Push(a);
                return rec((a - 1) / 10, b);
            }
            return false;
        }

        static void Main()
        {
            int a, b;
            string s = Console.ReadLine();
            var s1 = s.Split(' ');
            a = int.Parse(s1[0]);
            b = int.Parse(s1[1]);
            if (rec(b, a))
            {
                Console.WriteLine("YES");
                Console.WriteLine(steps.Count);
                int cont = 1;
                foreach (int item in steps)
                {
                    Console.Write(item);
                    if (cont != steps.Count)
                        Console.Write(" ");
                    cont++;
                }
            }
            else Console.WriteLine("NO");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            string x = Console.ReadLine();
            int a = int.Parse(x.Split(' ')[0]);
            int b = int.Parse(x.Split(' ')[1]);
            int z = b;
            string resul = x.Split(' ')[1];
            int i = 0;
            while (a!=z && z != 0)
            {
                int h = z%10;
                if (h != 0 && (h%2) == 1)
                {
                    for (int f = h; f > 0; f--)
                    {
                        i++;
                        z = (z - 1) / 10;
                        resul = z + " " + resul;
                    }
                }
                else
                {
                    i++;

                    z = z / 2;
                    resul = z + " " + resul;
                }
            }
            if (z == 0)
                Console.WriteLine("NO");
            else
            {
                Console.WriteLine("YES");
                Console.WriteLine(i + 1);
                Console.WriteLine(resul);
            }
           /* for (i = i; a*2 <= b; i++)
            {
                a = a * 2;
                resul = resul + " " + a;
                if(a == b)
                {
                    Console.WriteLine("YES");
                    Console.WriteLine(i);
                    Console.WriteLine(resul);
                    i = 999;
                }
            }*/
            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A
{
    class Program
    {
        static int GetNumberInt()
        {
            return Convert.ToInt32(Console.ReadLine());
        }

        static long GetNumberLong()
        {
            return Convert.ToInt64(Console.ReadLine());
        }

        static int[] GetArrayInt()
        {
            string[] @string = Console.ReadLine().Split(' ');
            int[] array = new int[@string.Length];
            for (int i = 0; i < array.Length; i++)
            {
                array[i] = Convert.ToInt32(@string[i]);
            }
            return array;
        }

        static long[] GetArrayLong()
        {
            string[] @string = Console.ReadLine().Split(' ');
            long[] array = new long[@string.Length];
            for (int i = 0; i < array.Length; i++)
            {
                array[i] = Convert.ToInt64(@string[i]);
            }
            return array;
        }

        static bool PossibleAtoB(long[] array, int currentIndex, long b)
        {
            if (array[currentIndex] > b)
                return false;
            if (array[currentIndex] == b)
                return true;
            array[currentIndex + 1] = 2 * array[currentIndex];
            bool flag = PossibleAtoB(array, currentIndex + 1, b);
            if (!flag)
            {
                array[currentIndex + 1] = 10 * array[currentIndex] + 1;
                flag = PossibleAtoB(array, currentIndex + 1, b);
            }
            return flag;
        }
        static int GetLengthArray(long[] array, long b)
        {
            int count = 0;
            for (int i = 0; i < array.Length; i++)
            {
                count++;
                if (array[i] >= b)
                    break;
            }
            return count;
        }
        static void Main(string[] args)
        {
            long[] array = GetArrayLong();
            long a = array[0], b = array[1];
            int count = 0;
            array = new long[40];
            array[0] = a;
            bool flag = PossibleAtoB(array, 0, b);
            if (flag)
            {
                Console.WriteLine("YES");
                count = GetLengthArray(array, b);
                Console.WriteLine(count);
                for (int i = 0; i < count; i++)
                {
                    Console.Write("{0} ", array[i]);
                }
            }
            else
                Console.WriteLine("NO");
        }
    }
}

using System;
using System.IO;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

class Program
{
    long[] c = new long[40];
    int indC = 0;
    bool tutu(long a, long b)
    {
        if (a == b)
            return true;
        if (a > b)
            return false;
        if (tutu(a * 10 + 1, b))
        {
            c[indC++] = a;
            return true;
        }
        else if (tutu(a * 2, b))
        {
            c[indC++] = a;
            return true;
        }
        return false;
    }

    //////////////////////////////////////////////////
    void Solution()
    {
        var a = rl;
        var b = rl;
        c[indC++] = b;
        if (tutu(a, b))
        {
            wln("YES");
            wln(indC);
            for (int i = indC - 1; i >= 0; i--)
                wsp(c[i]);
        }
        else
        {
            wln("NO");
            return;
        }

    }
    //////////////////////////////////////////////////

    static void swap<T>(ref T o1, ref T o2) { var o = o1; o1 = o2; o2 = o; }

    static void wln() { Console.WriteLine(); }
    static void wln<T>(T o) { Console.WriteLine(o); }
    static void wsp<T>(T o) { Console.Write(o + " "); }
    static void wrt<T>(T o) { Console.Write(o); }

    static void wln(double o) { Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0:F12}", o)); }
    static void wsp(double o) { Console.Write(string.Format(CultureInfo.InvariantCulture, "{0:F12} ", o)); }
    static void wrt(double o) { Console.Write(string.Format(CultureInfo.InvariantCulture, "{0:F12}", o)); }

    static long gcd(long a, long b) { return (b != 0) ? gcd(b, a % b) : a; }
    static long lcm(long a, long b) { return a / gcd(a, b) * b; }

    int ri
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind;
            int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; }
            int p = 0;
            while (_ind < _count && _str[_ind] != ' ') p = p * 10 + _str[_ind++] - '0';
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return p * sign;
        }
    }
    long rl
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind;
            int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; }
            long p = 0;
            while (_ind < _count && _str[_ind] != ' ') p = p * 10 + _str[_ind++] - '0';
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return p * sign;
        }
    }
    double rd
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind; int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; }
            long p = 0, q = 1; while (_ind < _count && _str[_ind] != ' ' && _str[_ind] != '.') p = p * 10 + _str[_ind++] - '0';
            if (_ind < _count && _str[_ind] == '.') { ++_ind; while (_ind < _count && _str[_ind] != ' ') { p = p * 10 + _str[_ind++] - '0'; q *= 10; } }
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return (double)p / q * sign;
        }
    }
    string rs
    {
        get
        {
            _read(); while (_ind < _count && _str[_ind] == ' ') ++_ind;
            var tmp = _str.IndexOf(' ', _ind);
            if (tmp == -1) { _count = 0; _ind = 0; return _str.Substring(_ind); }
            var s = _str.Substring(_ind, tmp - _ind); _ind = tmp + 1;
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return s;
        }
    }

    int[] ria(int n)
    {
        var res = new int[n];
        for (int k = 0; k < n;)
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                int p = 0; while (i < m && s[i] != ' ') p = p * 10 + s[i++] - '0'; res[k++] = p * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    long[] rla(int n)
    {
        var res = new long[n];
        for (int k = 0; k < n;)
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                long p = 0; while (i < m && s[i] != ' ') p = p * 10 + s[i++] - '0'; res[k++] = p * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    double[] rda(int n)
    {
        var res = new double[n];
        for (int k = 0; k < n;)
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                long p = 0, q = 1; while (i < m && s[i] != ' ' && s[i] != '.') p = p * 10 + s[i++] - '0';
                if (i < m && s[i] == '.') { ++i; while (i < m && s[i] != ' ') { p = p * 10 + s[i++] - '0'; q *= 10; } }
                res[k++] = (double)p / q * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    string[] rsa(int n) { var res = new string[n]; for (int k = 0; k < n; ++k) res[k] = Console.ReadLine(); _count = 0; _ind = 0; return res; }
    string _str = null; int _count = 0; int _ind = 0;
    void _read() { if (_ind == _count) { _str = Console.ReadLine(); _count = _str.Length; _ind = 0; } }
    static void Main() { new Program().Solution(); }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

class Program
{
    private static List<string> brackets = new List<string>();
    private static void GetAll(int n)
    {
        int[] m = new int[n + 1];
        while (m[n] == 0)
        {
            m[0]++;
            for (int i = 0; i < n & m[i] >= 3; i++)
            {
                m[i + 1]++;
                m[i] -= 3;
            }

            bool correct = true;
            int cnt = 0;
            for (int i = 0; i < n; i++)
            {
                if (m[i] == 1) cnt++;
                if (m[i] == 2) cnt--;
                if (cnt < 0) correct = false;
            }

            correct &= (cnt == 0);

            if (correct)
            {
                char[] q = new char[n];
                for (int i = 0; i < n; i++)
                {
                    if (m[i] == 0) q[i] = '0';
                    if (m[i] == 1) q[i] = '(';
                    if (m[i] == 2) q[i] = ')';
                }

                brackets.Add(new string(q));
            }
        }

    }

    private static void SolveArcherTravel1459()
    {
        // http://acm.timus.ru/problem.aspx?space=1&num=1459
        GetAll(5);
        Console.WriteLine(brackets.Count);
        Console.WriteLine(string.Join(Environment.NewLine, brackets));
    }

    static void Main(string[] args)
    {
        int a = RI();
        long b = RI();

        var ans = Go(a, b);
        if (ans == null)
            Console.Write("NO");
        else
        {
            Console.WriteLine("YES");
            Console.WriteLine(ans.Count);
            Console.Write(string.Join(" ", ans));
        }
    }

    private static List<long> Go(long a, long b)
    {
        if (a > b) return null;
        if (a == b) return new List<long>() { a };

        var ans = Go(a + a, b);
        if (ans == null) ans = Go(10 * a + 1, b);
        if (ans != null) ans.Insert(0, a);

        return ans;
    }

    private const int Mod = 1000000000 + 7;

    #region Data Read
    private static char ReadSign()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (ans == '+' || ans == '-' || ans == '?')
                return (char)ans;
        }
    }

    private static long GCD(long a, long b)
    {
        if (a % b == 0) return b;
        return GCD(b, a % b);
    }

    private static List<int>[] ReadGraph(int n, int m)
    {
        List<int>[] g = new List<int>[n + 1];
        for (int i = 0; i < g.Length; i++) g[i] = new List<int>();
        for (int i = 0; i < m; i++)
        {
            int a = RI();
            int b = RI();

            g[a].Add(b);
            g[b].Add(a);
        }

        return g;
    }

    private static int[,] ReadGraphAsMatrix(int n, int m)
    {
        int[,] matrix = new int[n + 1, n + 1];
        for (int i = 0; i < m; i++)
        {
            int a = RI();
            int b = RI();
            matrix[a, b] = matrix[b, a] = 1;
        }

        return matrix;
    }

    private static void Sort(ref int a, ref int b)
    {
        if (a > b) Swap(ref a, ref b);
    }

    private static void Swap(ref int a, ref int b)
    {
        int tmp = a;
        a = b;
        b = tmp;
    }

    private const int BufferSize = 1 << 16;
    private static StreamReader consoleReader;
    private static MemoryStream testData;

    private static int RI()
    {
        int ans = 0;
        int mul = 1;
        do
        {
            ans = consoleReader.Read();
            if (ans == -1)
                return 0;
            if (ans == '-') mul = -1;
        } while (ans < '0' || ans > '9');

        ans -= '0';
        while (true)
        {
            int chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans * mul;
            ans = ans * 10 + chr - '0';
        }
    }

    private static ulong RUL()
    {
        ulong ans = 0;
        int chr;
        do
        {
            chr = consoleReader.Read();
            if (chr == -1)
                return 0;
        } while (chr < '0' || chr > '9');

        ans = (uint)(chr - '0');
        while (true)
        {
            chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans;
            ans = ans * 10 + (uint)(chr - '0');
        }
    }

    private static long RL()
    {
        long ans = 0;
        int mul = 1;
        do
        {
            ans = consoleReader.Read();
            if (ans == -1)
                return 0;
            if (ans == '-') mul = -1;
        } while (ans < '0' || ans > '9');

        ans -= '0';
        while (true)
        {
            int chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans * mul;
            ans = ans * 10 + chr - '0';
        }
    }

    private static int[] RIA(int n)
    {
        int[] ans = new int[n];
        for (int i = 0; i < n; i++)
            ans[i] = RI();
        return ans;
    }

    private static long[] RLA(int n)
    {
        long[] ans = new long[n];
        for (int i = 0; i < n; i++)
            ans[i] = RL();
        return ans;
    }

    private static char[] ReadWord()
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));

        List<char> s = new List<char>();
        do
        {
            s.Add((char)ans);
            ans = consoleReader.Read();
        } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));

        return s.ToArray();
    }

    private static char[] ReadString(int n)
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));

        char[] s = new char[n];
        int pos = 0;
        do
        {
            s[pos++] = (char)ans;
            if (pos == n) break;
            ans = consoleReader.Read();
        } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));

        return s;
    }

    private static char[] ReadStringLine()
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (ans == 10 || ans == 13);

        List<char> s = new List<char>();

        do
        {
            s.Add((char)ans);
            ans = consoleReader.Read();
        } while (ans != 10 && ans != 13);

        return s.ToArray();
    }

    private static char ReadLetter()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'))
                return (char)ans;
        }
    }
    private static char ReadNonLetter()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')))
                return (char)ans;
        }
    }

    private static char ReadAnyOf(IEnumerable<char> allowed)
    {
        while (true)
        {
            char ans = (char)consoleReader.Read();
            if (allowed.Contains(ans))
                return ans;
        }
    }

    private static char ReadDigit()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (ans >= '0' && ans <= '9')
                return (char)ans;
        }
    }

    private static int ReadDigitInt()
    {
        return ReadDigit() - (int)'0';
    }

    private static char ReadAnyChar()
    {
        return (char)consoleReader.Read();
    }

    private static string DoubleToString(double x)
    {
        return x.ToString(CultureInfo.InvariantCulture);
    }

    private static double DoubleFromString(string x)
    {
        return double.Parse(x, CultureInfo.InvariantCulture);
    }

    static Program()
    {
        //Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
        consoleReader = new StreamReader(Console.OpenStandardInput(BufferSize), Encoding.ASCII, false, BufferSize);
    }

    private static void PushTestData(StringBuilder sb)
    {
        PushTestData(sb.ToString());
    }
    private static void PushTestData(string data)
    {
#if TOLYAN_TEST
        if (testData == null)
        {
            testData = new MemoryStream();
            consoleReader = new StreamReader(testData);
        }

        var pos = testData.Position;
        var bytes = Encoding.UTF8.GetBytes(data);
        testData.Write(bytes, 0, bytes.Length);
        testData.Flush();
        testData.Position = pos;
#endif
    }
    #endregion
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _727А
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] read = Console.ReadLine().Split(new Char[] { ' ' });
            int a = Convert.ToInt32(read[0]);
            int b = Convert.ToInt32(read[1]);
            List<int> arr = new List<int>();
            arr.Add(b);
            int count = 0;
            //Получить из b число a
            while (true)
            {
                string temp = b.ToString().Substring(b.ToString().Length - 1);
                if (temp == "1" && b.ToString().Length > 1)
                {
                    //число заканчивается на 1
                    b = Convert.ToInt32(b.ToString().Substring(0, b.ToString().Length-1));
                    //получили преобразованное число
                }
                else if(b >= a)
                {
                    b = b / 2;

                }
                else
                {
                    Console.WriteLine("NO");
                    break;
                }
                arr.Add(b); count++;
                if (b == a) {
                    arr.Reverse();
                    string result = "";
                    foreach(int c in arr)
                    {
                        result += c + " ";
                    }
                    Console.WriteLine("YES\n" + count + "\n" + result);
                    break;
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _727А
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] read = Console.ReadLine().Split(new Char[] { ' ' });
            int a = Convert.ToInt32(read[0]);
            int b = Convert.ToInt32(read[1]);
            string result = b.ToString() + " ";
            int count = 0;
            //Получить из b число a
            while (true)
            {
                string temp = b.ToString().Substring(b.ToString().Length - 1);
                if (temp == "1" && b.ToString().Length > 1)
                {
                    //число заканчивается на 1
                    b = Convert.ToInt32(b.ToString().Substring(0, b.ToString().Length-1));
                    //получили преобразованное число
                }
                else if(b >= a)
                {
                    b = b / 2;

                }
                else
                {
                    Console.WriteLine("NO");
                    break;
                }
                result += b + " "; count++;
                if (b == a) {
                    Console.WriteLine("YES\n" + count + "\n" + result);
                    break;
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _727А
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] read = Console.ReadLine().Split(new Char[] { ' ' });
            int a = Convert.ToInt32(read[0]);
            int b = Convert.ToInt32(read[1]);
            List<int> arr = new List<int>();
            arr.Add(b);
            int count = 1;
            //Получить из b число a
            while (true)
            {
                string temp = b.ToString().Substring(b.ToString().Length - 1);
                if (temp == "1" && b.ToString().Length > 1)
                {
                    //число заканчивается на 1
                    b = Convert.ToInt32(b.ToString().Substring(0, b.ToString().Length-1));
                    //получили преобразованное число
                }
                else if(b >= a)
                {
                    b = b / 2;

                }
                else
                {
                    Console.WriteLine("NO");
                    break;
                }
                arr.Add(b); count++;
                if (b == a) {
                    arr.Reverse();
                    string result = "";
                    foreach(int c in arr)
                    {
                        result += c + " ";
                    }
                    Console.WriteLine("YES\n" + (count) + "\n" + result);
                    break;
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _727А
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] read = Console.ReadLine().Split(new Char[] { ' ' });
            int a = Convert.ToInt32(read[0]);
            int b = Convert.ToInt32(read[1]);
            List<int> arr = new List<int>();
            arr.Add(b);
            int count = 0;
            //Получить из b число a
            while (true)
            {
                string temp = b.ToString().Substring(b.ToString().Length - 1);
                if (temp == "1" && b.ToString().Length > 1)
                {
                    //число заканчивается на 1
                    b = Convert.ToInt32(b.ToString().Substring(0, b.ToString().Length-1));
                    //получили преобразованное число
                }
                else if(b >= a)
                {
                    b = b / 2;

                }
                else
                {
                    Console.WriteLine("NO");
                    break;
                }
                arr.Add(b); count++;
                if (b == a) {
                    arr.Reverse();
                    string result = "";
                    foreach(int c in arr)
                    {
                        result += c + " ";
                    }
                    Console.WriteLine("YES\n" + (count-1) + "\n" + result);
                    break;
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace cf727A
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] ab = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

            int a = ab[0]; int b = ab[1];

            List<int> operations = new List<int>();

            while(b > a)
            {
                operations.Add(b);
                if ((b % 2) == 0)
                    b /= 2;
                else if (b.ToString().EndsWith("1"))
                {
                    b = (b - 1) / 10;
                }
                else
                {
                    Console.WriteLine("NO"); return;
                }
            }

            if (b == a)
            {
                Console.WriteLine("YES");
                Console.WriteLine(operations.Count + 1);
                Console.Write(a); Console.Write(' ');
                for (int i = 1; i <= operations.Count; i++)
                {
                    Console.Write(operations[operations.Count-i]); Console.Write(' ');
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b;
            string Result = "NO";
            //int[] posled ;
            List<int> posled = new List<int>();
            //Console.WriteLine("Введите a");
            //a =int.Parse(Console.ReadLine().ToString());
            //Console.WriteLine("Введите b");
            //b = int.Parse(Console.ReadLine().ToString());
            string[] input = Console.ReadLine().Split(' ');
            a = int.Parse(input[0]);
            b = int.Parse(input[1]);
            int tempVar = b;
            while (tempVar > a)
            {
                posled.Add(tempVar);
                if (tempVar % 2 > 0)
                {
                    tempVar = (tempVar - 1) / 10;
                }
                else
                {
                    tempVar = tempVar / 2;
                }

                if (tempVar < 1)
                {
                    Result = "NO";
                    break;
                }
            }
            if (tempVar == a)
            {
                Result = "YES";
            };
            posled.Add(a);

            Console.WriteLine(Result);
            if (Result == "YES")
            {
                Console.WriteLine(posled.Count());
                for (int i = posled.Count() - 1; i >= 0; i--)
                {
                    Console.Write(posled[i] + " ");
                }

            }
            //Console.ReadKey();

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            long a, b;
            string Result = "NO";
            //int[] posled ;
            List<long> posled = new List<long>();
            //Console.WriteLine("Введите a");
            //a =int.Parse(Console.ReadLine().ToString());
            //Console.WriteLine("Введите b");
            //b = int.Parse(Console.ReadLine().ToString());
            string[] input = Console.ReadLine().Split(' ');
            a = long.Parse(input[0]);
            b = long.Parse(input[1]);
            long tempVar = b;
            while (tempVar > a)
            {
                posled.Add(tempVar);
                if (tempVar % 2 > 0)
                {
                    tempVar = (tempVar - 1) / 10;
                }
                else
                {
                    tempVar = tempVar / 2;
                }

                if (tempVar < 1)
                {
                    Result = "NO";
                    break;
                }
            }
            if (tempVar == a)
            {
                Result = "YES";
            };
            posled.Add(a);

            Console.WriteLine(Result);
            if (Result == "YES")
            {
                Console.WriteLine(posled.Count());
                for (int i = posled.Count() - 1; i >= 0; i--)
                {
                    Console.Write(posled[i] + " ");
                }

            }
            //Console.ReadKey();

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OlympPrepSharp
{
    public class Node
    {
        public int Val;
        public Node Left, Right;

        public Node(int val)
        {
            Val = val;
            Left = null;
            Right = null;
        }

        public void BuildTree()
        {
            if(Val == 0) return;
            if (Val%2 == 0)
            {
                Left = new Node(Val/2);
                Left.BuildTree();
            }
            else Left = null;
            if ((Val - 1)%10 == 0)
            {
                Right = new Node((Val - 1)/10);
                Right.BuildTree();
            }
            else Right = null;
        }

        public List<int> DFS(int lookFor, List<int> prev)
        {
            List<int> cur = new List<int>(prev);
            cur.Add(Val);
            if (Val == lookFor) return cur;
            if (Left != null)
            {
                List<int> left = Left.DFS(lookFor, cur);
                if (left[0] != -1) return left;
            }
            if (Right != null)
            {
                List<int> right = Right.DFS(lookFor, cur);
                if (right[0] != -1) return right;
            }
            return new List<int> {-1};

        }
    }

    class Program
    {

        static void Main(string[] args)
        {
            try
            {

                int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
                Node root = new Node(input[1]);
                root.BuildTree();
                List<int> result = root.DFS(input[0], new List<int>());
                if (result[0] == -1) Console.WriteLine("NO");
                else
                {
                    Console.WriteLine("YES");
                    Console.WriteLine(result.Count);
                    for (int i = result.Count - 1; i >= 0; i--)
                    {
                        Console.Write(result[i] + " ");
                    }
                    Console.WriteLine();
                }
                Console.ReadKey();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }

        static void PrintCol<T>(IEnumerable<T> col)
        {
            foreach (var i in col)
            {
                Console.Write(i + " ");
            }
            Console.WriteLine();
        }
    }
}

#undef DEBUG

using System;

namespace _1
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            int a = Convert.ToInt32(str.Split(' ')[0]);
            int b = Convert.ToInt32(str.Split(' ')[1]);
            int tmp = b;
            int[] nums = { b };
            while (tmp!=a)
            {
                if (tmp < a)
                {
                    Console.WriteLine("NO");
                    goto end;
                }
                Array.Resize(ref nums, nums.Length + 1);
                if (tmp % 2 == 0)
                {
                    tmp = tmp / 2;
                }
               else
                {
                    tmp = (tmp - 1) / 10;
                }
                nums[nums.Length - 1] = tmp;
            }
            Console.WriteLine("YES");
            Console.WriteLine(nums.Length);
            string stmp = "";
            for (int i = nums.Length - 1; i >= 0; i--)
            {
                stmp += nums[i] + " ";
            }
            stmp.TrimEnd();
            Console.WriteLine(stmp);
        end:;
#if DEBUG
            Console.ReadKey();
#endif
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _727A
{
    class Program
    {
        static void Main()
        {
            string[] input = Console.ReadLine().Split(' ');
            int a = int.Parse(input[0]), b = int.Parse(input[1]);
            var sequence = new List<int>();
            sequence.Add(b);

            while (true)
            {
                var last = sequence[sequence.Count - 1];
                if (last == a)
                {
                    Console.WriteLine("YES");
                    sequence.Reverse();
                    Console.WriteLine(sequence.Count);
                    Console.WriteLine(string.Join(" ", sequence));
                    break;
                }
                else if (last < a)
                {
                    Console.WriteLine("NO");
                    break;
                }

                if (last % 2 == 0)
                {
                    sequence.Add(last / 2);
                }
                else
                {
                    sequence.Add((last - 1) / 10);
                }
            }
            //Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace TaskA
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ');
            int a = int.Parse(input[0]);
            int b = int.Parse(input[1]);
            var result = new Stack<int>();
            result.Push(b);
            bool found = false;

            while (b > a)
            {
                if (b % 2 == 0)
                    b /= 2;
                else
                    b /= 10;

                result.Push(b);

                if (b == a)
                    found = true;
            }

            if (found)
            {
                Console.WriteLine("YES");
                while (result.Count > 0)
                {
                    if (result.Count > 1)
                        Console.Write("{0} ", result.Pop());
                    else
                        Console.Write(result.Pop());
                }
            }
            else
                Console.WriteLine("NO");

            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace TaskA
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ');
            int a = int.Parse(input[0]);
            int b = int.Parse(input[1]);
            var result = new Stack<int>();
            result.Push(b);
            bool found = false;

            while (b > a)
            {
                if (b % 2 == 0)
                    b /= 2;
                else
                    b /= 10;

                result.Push(b);

                if (b == a)
                    found = true;
            }

            if (found)
            {
                Console.WriteLine("YES");
                while (result.Count > 0)
                {
                    Console.Write("{0} ", result.Pop());
                }
            }
            else
                Console.WriteLine("NO");

            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

namespace CF317
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var sr = new InputReader(Console.In);
            //var sr = new InputReader(new StreamReader("input.txt"));
            var task = new Task();
            using (var sw = Console.Out)
            //using (var sw = new StreamWriter("output.txt"))
            {
                task.Solve(sr, sw);
                //Console.ReadKey();
            }
        }
    }

    internal class Task
    {
        public void Solve(InputReader sr, TextWriter sw)
        {
            var input = sr.ReadArray(Int32.Parse);
            var a = input[0];
            var b = input[1];
            var list = new List<int>();
            while (true) {
                list.Add(b);
                if (b == a)
                {
                    sw.WriteLine("YES");
                    break;
                }
                if (b < a)
                {
                    sw.WriteLine("NO");
                    return;
                }
                if (b%2 == 0) {
                    b /= 2;
                }
                else {
                    b /= 10;
                }
            }
            list.Reverse();
            var sb = new StringBuilder();
            foreach (var i in list) {
                sb.Append(i + " ");
            }

            sw.Write(sb);
        }
    }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(NextString());
    }

    public long NextInt64()
    {
        return Int64.Parse(NextString());
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();
            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

namespace CF317
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var sr = new InputReader(Console.In);
            //var sr = new InputReader(new StreamReader("input.txt"));
            var task = new Task();
            using (var sw = Console.Out)
            //using (var sw = new StreamWriter("output.txt"))
            {
                task.Solve(sr, sw);
                //Console.ReadKey();
            }
        }
    }

    internal class Task
    {
        public void Solve(InputReader sr, TextWriter sw)
        {
            var input = sr.ReadArray(Int32.Parse);
            var a = input[0];
            var b = input[1];
            var list = new List<int>();
            while (true) {
                list.Add(b);
                if (b == a)
                {
                    sw.WriteLine("YES");
                    break;
                }
                if (b < a)
                {
                    sw.WriteLine("NO");
                    return;
                }
                if (b%2 == 0) {
                    b /= 2;
                }
                else {
                    b /= 10;
                }
            }
            list.Reverse();
            var sb = new StringBuilder();
            foreach (var i in list) {
                sb.Append(i + " ");
            }

            sw.WriteLine(list.Count);
            sw.Write(sb);
        }
    }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(NextString());
    }

    public long NextInt64()
    {
        return Int64.Parse(NextString());
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();
            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace TaskA
{
    class Program
    {
        private static readonly Stack<int> Stack = new Stack<int>();
        private static int a;
        private static int b;

        private static bool AtoB()
        {
            if (a > b) return false;
            Stack.Push(a);
            if (a == b) return true;
            var temp = a;
            a = a * 10 + 1;
            var result = AtoB();
            if (result) return true;
            a = temp * 2;
            result = AtoB();
            if (result) return true;
            a = temp;
            Stack.Pop();
            return false;
        }

        static void Main()
        {
            var ab = Console.ReadLine().Split(' ').ToArray();
            a = int.Parse(ab[0]);
            b = int.Parse(ab[1]);
            if (b % 2 == 1 && b % 10 == 1)
            {
                Console.WriteLine("NO");
                return;
            }
            if (AtoB())
            {
                Console.WriteLine("YES");
                Console.WriteLine(Stack.Count);
                foreach (var temp in Stack.Reverse())
                    Console.Write("{0} ", temp);
            }
            else Console.WriteLine("NO");
        }
    }
}

using System;
using System.Linq;

namespace TaskA
{
    class Program
    {
        private static readonly int[] stack = new int[50];
        private static int a;
        private static int b;

        private static int AtoB(int step)
        {
            if (a > b) return 0;
            stack[step] = a;
            if (a == b) return step;
            var temp = a;
            a = a * 10 + 1;
            var result = AtoB(step + 1);
            if (result > 0) return result;
            a = temp * 2;
            result = AtoB(step + 1);
            if (result > 0) return result;
            return 0;
        }

        static void Main()
        {
            var ab = Console.ReadLine().Split(' ').ToArray();
            a = int.Parse(ab[0]);
            b = int.Parse(ab[1]);
            var result = AtoB(0);
            if (result>0)
            {
                Console.WriteLine("YES");
                Console.WriteLine(result+1);
                for(var i=result;i>=0;i--)
                    Console.Write("{0} ", stack[i]);
            }
            else Console.WriteLine("NO");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
	class Program
	{
		static void Main(string[] args)
		{
			string s = Console.ReadLine();
			string[] sLst = s.Split(' ');
			Stack<Int64> sNum = new Stack<Int64>();
			try
			{
				Int64 numA = Convert.ToInt64(sLst[0].Trim());
				Int64 numB = Convert.ToInt64(sLst[1].Trim());

				if ( numB <= numA)
				{
					Console.Write("NO");
					return;
				}
				sNum.Push(numB);
				while (numA < numB)
				{
					if (numB % 10 == 1)
						numB = (numB - 1) / 10;
					else if (numB % 2 == 1)
					{
						Console.Write("NO");
						return;
					}
					else
					{
						numB = numB / 2;
					}
					sNum.Push(numB);
				}
				if ( numA > numB)
				{
					Console.Write("NO");
					return;
				}
				Console.WriteLine("YES");
				while( sNum.Count > 0)
				{
					Console.Write(sNum.Pop());
					if (sNum.Count > 0) Console.Write(" ");
				}
			}
			catch(Exception ex)
			{
				Console.Write("NO");
			}
			//finally
			//{
			//	Console.ReadLine();
			//}
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Задачи
{
    class Program
    {
        static void Main(string[] args)
        {
            string instring = Console.ReadLine(), outstring="";
            int x1 = Convert.ToInt32(instring.Substring(0, instring.LastIndexOf(' '))); int a1 = x1,k=1, f = 1;
            int x2 = Convert.ToInt32(instring.Substring(instring.LastIndexOf(' '), instring.Length-instring.LastIndexOf(' '))); int b1 = x2;
            while (k != 0)
            {

                if ((b1 % 2 == 0) && (b1 != 0) && (b1 != a1))
                {
                    k = 13;
                    b1 = b1 / 2;
                    outstring = Convert.ToString(b1) + " " + outstring;
                }
                else if ((b1 % 10 == 1) && (b1 != 1) && (b1 != a1))
                {
                    k = 1;
                    b1 = b1 / 10;
                    outstring = Convert.ToString(b1) + " " + outstring;
                }
                else k = 0;
                f++;
            }
            outstring = outstring  + Convert.ToString(x2);
            if (b1 == a1) Console.WriteLine("YES\n{0}\n{1}", f,outstring);
            else Console.WriteLine("NO");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Задачи
{
    class Program
    {
        static void a1()
        {
            string instring = Console.ReadLine(), outstring="";
            int x1 = Convert.ToInt32(instring.Substring(0, instring.LastIndexOf(' '))); int a1 = x1,k=1, f = 1;
            int x2 = Convert.ToInt32(instring.Substring(instring.LastIndexOf(' '), instring.Length-instring.LastIndexOf(' '))); int b1 = x2;
            while (k != 0)
            {

                if ((b1 % 2 == 0) && (b1 != 0) && (b1 != a1))
                {
                    k = 13;
                    b1 = b1 / 2;
                    outstring = Convert.ToString(b1) + " " + outstring;
                }
                else if ((b1 % 10 == 1) && (b1 != 1) && (b1 != a1))
                {
                    k = 1;
                    b1 = b1 / 10;
                    outstring = Convert.ToString(b1) + " " + outstring;
                }
                else k = 0;
                f++;
            }
            outstring = outstring  + Convert.ToString(x2);
            if (b1 == a1) Console.WriteLine("YES\n{0}\n{1}", f,outstring);
            else Console.WriteLine("NO");
        }
        static void Main(string[] args)
        {
            a1();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Div._2_A.Transformation_from_A_to_B
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            long a = long.Parse(s[0]);
            long b = long.Parse(s[1]);
            List<long> list = new List<long>();

            while (b > a)
            {
                list.Add(b);

                if (b % 2 == 0)
                    b /= 2;
                else if(b > 10 && b % 10 == 1)
                    b /= 10;
                else
                    break;
            }
            if (a == b)
            {
                Console.WriteLine("YES");
                Console.WriteLine(list.Count);
                for (int i = list.Count-1; i >= 0; i--)
                {
                    Console.Write(list[i] + " ");
                }
            }
            else
                Console.WriteLine("NO");
            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Div._2_A.Transformation_from_A_to_B
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            long a = long.Parse(s[0]);
            long b = long.Parse(s[1]);
            List<long> list = new List<long>();
            bool right = false;
            while (b >= a)
            {
                list.Add(b);
                if (a == b)
                {
                    right = true;
                    break;
                }
                if (b % 2 == 0)
                {
                    b /= 2;
                }
                else if(b > 10 && b % 10 == 1)
                {
                    b /= 10;
                }
                else
                {
                    right = false;
                    break;
                }
            }
            if (right)
            {
                Console.WriteLine("YES");
                for (int i = list.Count-1; i >= 0; i--)
                {
                    Console.Write(list[i] + " ");
                }
            }
            else
                Console.WriteLine("NO");
            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;

namespace CCS
{
    class Program
    {
        static List<int> s = new List<int>();

        static void Rec(int a, int b)
        {
            if (a == b)
            {
                s.Add(b);
                return;
            }
            else if (b > a)
            {
                if (b % 2 == 0)
                    Rec(a, b / 2);
                else
                    Rec(a, (b - 1) / 10);

                if (s.Count > 0)
                    s.Add(b);
            }
        }

        static void Main()
        {
            string[] input = Console.ReadLine().Split(' ');
            Rec(int.Parse(input[0]), int.Parse(input[1]));
            if (s.Count > 0)
            {
                Console.WriteLine("YES");
                Console.WriteLine(s.Count.ToString());
                for (int i = 0; i < s.Count; i++)
                    Console.Write(s[i] + " ");
                return;
            }
            Console.Write("NO");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace Competitions
{
    class CF1A
    {
        static void Main(string[] args)
        {
            var arr = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            int a = arr[0];
            int b = arr[1];

            var list = new List<int>();
            list.Add(b);
            while (true)
            {
                if (b == a)
                {
                    Console.WriteLine("YES");
                    Console.WriteLine(list.Count);
                    list.Reverse();
                    Console.WriteLine(string.Join(" ", list));
                    return;
                }
                if (b < a) break;
                if ((b & 1) == 1)
                {
                    b -= 1;
                    b /= 10;
                    list.Add(b);
                }
                else if (b%2 == 0)
                {
                    b /= 2;
                    list.Add(b);
                }
                else break;
            }

            Console.WriteLine("NO");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace olmp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string check = Console.ReadLine();
            string nCheck = "";
            foreach (char c in check)
            {
                if (c != '1' & c != '2' & c != '3' & c != '4' & c != '5' & c != '6' & c != '7' & c != '8' & c != '9' & c != '0' & c != '.')
                {
                    nCheck += '\0';
                }
                else
                {
                    nCheck += c;
                }
            }
            foreach (string t in nCheck.Replace('.', ',').Split(new char[] { '\0' }, StringSplitOptions.RemoveEmptyEntries))
            {
                string[] tSplit = t.Split(new char[] { ',' });
                for (int i = 0; i < tSplit.Length; i++)
                {
                    if (tSplit.Length == 1)
                    {
                        if (tSplit[i].Length > 3)
                        {
                            return;
                        }
                    }
                    else if (tSplit[i] == "")
                    {
                        return;
                    }
                    else if (i != 0 & tSplit.Length > 1 & tSplit[i].Length != 3 & i != tSplit.Length - 1)
                    {
                        return;
                    }
                    else if (i == tSplit.Length - 1 && tSplit[i].Length < 2)
                    {
                        return;
                    }
                }
            }
            string[] prices = nCheck.Replace('.', ',').Split(new char[] { '\0' }, StringSplitOptions.RemoveEmptyEntries);
            for (int p = 0; p < prices.Length; p++)
            {
                string[] split = prices[p].Split(new char[] { ',' });
                string newPrice = "";
                if (split.Length > 1)
                {
                    for (int s = 0; s < split.Length; s++)
                    {
                        if (split[s].Length > 2 | s < split.Length - 1)
                        {
                            newPrice += split[s];
                        }
                        else
                        {
                            newPrice += "," + split[s];
                        }
                    }
                    prices[p] = newPrice;
                }
            }
            double price = 0;
            foreach (double p in Array.ConvertAll(prices, Convert.ToDouble))
            {
                price += p;
            }
            string sPrice = price.ToString().Split(new char[] { ',' }).First();
            string nPrice = "";
            for (int c = sPrice.Length - 1, s = 0; c >= 0; c--)
            {
                nPrice = sPrice[c] + nPrice;
                s++;
                if (s == 3 & c != 0)
                {
                    nPrice = "." + nPrice;
                    s = 0;
                }
            }
            if (price.ToString().Split(new char[] { ',' }).Length > 1)
            {
                if (price.ToString().Split(new char[] { ',' }).Last().Length == 1)
                {
                    if (Convert.ToDouble(price.ToString().Split(new char[] { ',' }).Last()) > 0.1)
                    {
                        nPrice += "." + price.ToString().Split(new char[] { ',' }).Last() + "0";
                    }
                    else
                    {
                        nPrice += ".0" + price.ToString().Split(new char[] { ',' }).Last();
                    }
                }
                else
                {
                    nPrice += "." + price.ToString().Split(new char[] { ',' }).Last();
                }
            }
            Console.WriteLine(nPrice);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

class Program
{
    private static List<string> brackets = new List<string>();
    private static void GetAll(int n)
    {
        int[] m = new int[n + 1];
        while (m[n] == 0)
        {
            m[0]++;
            for (int i = 0; i < n & m[i] >= 3; i++)
            {
                m[i + 1]++;
                m[i] -= 3;
            }

            bool correct = true;
            int cnt = 0;
            for (int i = 0; i < n; i++)
            {
                if (m[i] == 1) cnt++;
                if (m[i] == 2) cnt--;
                if (cnt < 0) correct = false;
            }

            correct &= (cnt == 0);

            if (correct)
            {
                char[] q = new char[n];
                for (int i = 0; i < n; i++)
                {
                    if (m[i] == 0) q[i] = '0';
                    if (m[i] == 1) q[i] = '(';
                    if (m[i] == 2) q[i] = ')';
                }

                brackets.Add(new string(q));
            }
        }

    }

    private static void SolveArcherTravel1459()
    {
        // http://acm.timus.ru/problem.aspx?space=1&num=1459
        GetAll(5);
        Console.WriteLine(brackets.Count);
        Console.WriteLine(string.Join(Environment.NewLine, brackets));
    }

    static void Main(string[] args)
    {
        int a = RI();
        long b = RI();

        var ans = Go(a, b);
        if (ans == null)
            Console.Write("NO");
        else
        {
            Console.WriteLine("YES");
            Console.Write(string.Join(" ", ans));
        }
    }

    private static List<long> Go(long a, long b)
    {
        if (a > b) return null;
        if (a == b) return new List<long>() { a };

        var ans = Go(a + a, b);
        if (ans == null) ans = Go(10 * a + 1, b);
        if (ans != null) ans.Insert(0, a);

        return ans;
    }

    private const int Mod = 1000000000 + 7;

    #region Data Read
    private static char ReadSign()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (ans == '+' || ans == '-' || ans == '?')
                return (char)ans;
        }
    }

    private static long GCD(long a, long b)
    {
        if (a % b == 0) return b;
        return GCD(b, a % b);
    }

    private static List<int>[] ReadGraph(int n, int m)
    {
        List<int>[] g = new List<int>[n + 1];
        for (int i = 0; i < g.Length; i++) g[i] = new List<int>();
        for (int i = 0; i < m; i++)
        {
            int a = RI();
            int b = RI();

            g[a].Add(b);
            g[b].Add(a);
        }

        return g;
    }

    private static int[,] ReadGraphAsMatrix(int n, int m)
    {
        int[,] matrix = new int[n + 1, n + 1];
        for (int i = 0; i < m; i++)
        {
            int a = RI();
            int b = RI();
            matrix[a, b] = matrix[b, a] = 1;
        }

        return matrix;
    }

    private static void Sort(ref int a, ref int b)
    {
        if (a > b) Swap(ref a, ref b);
    }

    private static void Swap(ref int a, ref int b)
    {
        int tmp = a;
        a = b;
        b = tmp;
    }

    private const int BufferSize = 1 << 16;
    private static StreamReader consoleReader;
    private static MemoryStream testData;

    private static int RI()
    {
        int ans = 0;
        int mul = 1;
        do
        {
            ans = consoleReader.Read();
            if (ans == -1)
                return 0;
            if (ans == '-') mul = -1;
        } while (ans < '0' || ans > '9');

        ans -= '0';
        while (true)
        {
            int chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans * mul;
            ans = ans * 10 + chr - '0';
        }
    }

    private static ulong RUL()
    {
        ulong ans = 0;
        int chr;
        do
        {
            chr = consoleReader.Read();
            if (chr == -1)
                return 0;
        } while (chr < '0' || chr > '9');

        ans = (uint)(chr - '0');
        while (true)
        {
            chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans;
            ans = ans * 10 + (uint)(chr - '0');
        }
    }

    private static long RL()
    {
        long ans = 0;
        int mul = 1;
        do
        {
            ans = consoleReader.Read();
            if (ans == -1)
                return 0;
            if (ans == '-') mul = -1;
        } while (ans < '0' || ans > '9');

        ans -= '0';
        while (true)
        {
            int chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans * mul;
            ans = ans * 10 + chr - '0';
        }
    }

    private static int[] RIA(int n)
    {
        int[] ans = new int[n];
        for (int i = 0; i < n; i++)
            ans[i] = RI();
        return ans;
    }

    private static long[] RLA(int n)
    {
        long[] ans = new long[n];
        for (int i = 0; i < n; i++)
            ans[i] = RL();
        return ans;
    }

    private static char[] ReadWord()
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));

        List<char> s = new List<char>();
        do
        {
            s.Add((char)ans);
            ans = consoleReader.Read();
        } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));

        return s.ToArray();
    }

    private static char[] ReadString(int n)
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));

        char[] s = new char[n];
        int pos = 0;
        do
        {
            s[pos++] = (char)ans;
            if (pos == n) break;
            ans = consoleReader.Read();
        } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));

        return s;
    }

    private static char[] ReadStringLine()
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (ans == 10 || ans == 13);

        List<char> s = new List<char>();

        do
        {
            s.Add((char)ans);
            ans = consoleReader.Read();
        } while (ans != 10 && ans != 13);

        return s.ToArray();
    }

    private static char ReadLetter()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'))
                return (char)ans;
        }
    }
    private static char ReadNonLetter()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')))
                return (char)ans;
        }
    }

    private static char ReadAnyOf(IEnumerable<char> allowed)
    {
        while (true)
        {
            char ans = (char)consoleReader.Read();
            if (allowed.Contains(ans))
                return ans;
        }
    }

    private static char ReadDigit()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (ans >= '0' && ans <= '9')
                return (char)ans;
        }
    }

    private static int ReadDigitInt()
    {
        return ReadDigit() - (int)'0';
    }

    private static char ReadAnyChar()
    {
        return (char)consoleReader.Read();
    }

    private static string DoubleToString(double x)
    {
        return x.ToString(CultureInfo.InvariantCulture);
    }

    private static double DoubleFromString(string x)
    {
        return double.Parse(x, CultureInfo.InvariantCulture);
    }

    static Program()
    {
        //Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
        consoleReader = new StreamReader(Console.OpenStandardInput(BufferSize), Encoding.ASCII, false, BufferSize);
    }

    private static void PushTestData(StringBuilder sb)
    {
        PushTestData(sb.ToString());
    }
    private static void PushTestData(string data)
    {
#if TOLYAN_TEST
        if (testData == null)
        {
            testData = new MemoryStream();
            consoleReader = new StreamReader(testData);
        }

        var pos = testData.Position;
        var bytes = Encoding.UTF8.GetBytes(data);
        testData.Write(bytes, 0, bytes.Length);
        testData.Flush();
        testData.Position = pos;
#endif
    }
    #endregion
}