Problem: Numbers k-bonacci (k is integer, k > 1) are a generalization of Fibonacci numbers and are determined as follows:

  * F(k, n) = 0, for integer n, 1 ≤ n < k; 
  * F(k, k) = 1; 
  * F(k, n) = F(k, n - 1) + F(k, n - 2) + ... + F(k, n - k), for integer n, n > k. 



Note that we determine the k-bonacci numbers, F(k, n), only for integer values of n and k.

You've got a number s, represent it as a sum of several (at least two) distinct k-bonacci numbers. 

Input

The first line contains two integers s and k (1 ≤ s, k ≤ 109; k > 1).

Output

In the first line print an integer m (m ≥ 2) that shows how many numbers are in the found representation. In the second line print m distinct integers a1, a2, ..., am. Each printed integer should be a k-bonacci number. The sum of printed integers must equal s.

It is guaranteed that the answer exists. If there are several possible answers, print any of them.

Examples

Input

5 2


Output

3
0 2 3


Input

21 5


Output

3
4 1 16

Solution (in JAVA):

Solution:

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author pttrung
 */

/*
 * aaaaaaaaa
  
 aaa

 */
public class B {

    public static int Mod = 1000003;

    public static void main(String[] args) throws FileNotFoundException {

        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        int s = in.nextInt();
        int k = in.nextInt();
        if (s == 1) {
            out.println(2);
            out.println(0 + " " + 1);
        } else {
            if (k < 100) {
                int count = 0;
                ArrayList<Integer> result = new ArrayList();
                while (s > 0) {
                    count++;
                    int val = cal(s, k);
                    result.add(val);
                    s -= val;
                }
                if (count == 1) {
                    count++;
                    result.add(0);
                }
                out.println(count);
                for (int i : result) {
                    out.print(i + " ");
                }
            } else {
                int count = 0;
                ArrayList<Integer> result = new ArrayList();
                while (s > 0) {
                    count++;

                    int val = (int) (Math.log(s) / Math.log(2));
                    val = (int) Math.pow(2, val);
                    s -= val;
                    result.add(val);
                }
                out.println(count);
                for (int i : result) {
                    out.print(i + " ");
                }
            }
        }
        out.close();
    }

    public static int cal(int val, int k) {
        if (val == 1) {
            return 1;
        }
        int[] data = new int[k];
        data[0] = 0;
        data[1] = 1;      
        int index = 1;

        int last = 0;
        while (data[last] < val) {
            int temp = 0;
            for(int i = 0; i < k; i++){
                temp+= data[i];
            } 
            data[index] = temp;
          //  System.out.println(data[index]);
            last = index;
            index = (index + 1) % k;
        }
        // System.out.println(data[last]);
        int max = -1;
        for (int i = 0; i < k; i++) {
            if (max == -1 && data[i] <=val || (max != -1 && data[i] > data[max] && data[i] <= val)) {
                max = i;
            }
        }
        //System.out.println(data[max]);
        return data[max];
    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static class Point {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;

        }
    }

    public static long pow(long a, int b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * (val * a);
        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long lcm(long a, long b) {
        return a * b / gcd(a, b);
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            //System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            // br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("square_detector.txt"))));
        }

        public String next() {


            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}