Dima loves representing an odd number as the sum of multiple primes, and Lisa loves it when there are at most three primes. Help them to represent the given number as the sum of at most than three primes.More formally, you are given an odd numer n. Find a set of numbers pi (1 ≤ i ≤ k), such that 1 ≤ k ≤ 3 pi is a prime The numbers pi do not necessarily have to be distinct. It is guaranteed that at least one possible solution exists.

The single line contains an odd number n (3 ≤ n < 109).

In the first line print k (1 ≤ k ≤ 3), showing how many numbers are in the representation you found. In the second line print numbers pi in any order. If there are multiple possible solutions, you can print any of them.

NoteA prime is an integer strictly larger than one that is divisible only by one and by itself.

//swap(arr,i,j)
//HashMap sortByValue(map);
//long comb=nCr(5,2);
//int gcd(s,l);
//Pair p=new Pair(x,y);

import java.util.*;
import java.io.*;

public class Codeforces {

    InputStream is;
    PrintWriter out;
    String INPUT = "";

//----------------------------------------------------------------------------------------------------//
   boolean isPrime(int n){
       if(n==0||n==1)return false;
       for (int i = 2; i <= (int)Math.sqrt(n); i++) {
           if(n%i==0)return false;
       }
       return true;
   }

    void solve() {
        int n=ni();
        if(isPrime(n)){
            out.println(1);
            out.println(n);
        }
        else if(n%3==0&&isPrime(n)){
            int x=n/3;
            out.println(x+" "+x+" "+x);
        }
        else if(isPrime(n-2)){
            out.println(2);
            out.println(2+" "+(n-2));
        }
        else{
            int x=n;
            int p1=0;
            for (int i = n; i >=2; i=i-2) {
                if(isPrime(i)){
                    p1=i;
                    break;
                }
            }
            int p2=n-p1;
            for (int i = 2; i <= p2; i++) {
                if(isPrime(i)&&isPrime(p2-i)){
                    out.println(3);
                    out.println(p1+" "+i+" "+(p2-i));
                    break;
                }
            }

        }

    }

//----------------------------------------------------------------------------------------------------//

    void swap(int a[], int l, int r) {
        int temp = a[l];
        a[l] = a[r];
        a[r] = temp;
    }

    long nCr(int n, int k) {
        long C[] = new long[k + 1];
        // nC0 is 1
        C[0] = 1;
        for (int i = 1; i <= n; i++) {
            for (int j = Math.min(i, k); j > 0; j--) {
                C[j] = C[j] + C[j - 1];
            }
        }
        return C[k];
    }

    public int gcd(int s, int l) {
        if (s == 0) {
            return l;
        }

        return gcd(l % s, s);
    }

    public HashMap<Integer, Integer> sortByValue(HashMap<Integer, Integer> hm) {
        // Create a list from elements of HashMap
        List<Map.Entry<Integer, Integer>> list
                = new LinkedList<>(hm.entrySet());

        //->change o1,o2 for reverseorder
        Collections.sort(list, (Map.Entry<Integer, Integer> o1, Map.Entry<Integer, Integer> o2) -> (o1.getValue()).compareTo(o2.getValue()));

        // put data from sorted list to hashmap
        HashMap<Integer, Integer> temp = new LinkedHashMap<>();
        list.forEach((aa) -> {
            temp.put(aa.getKey(), aa.getValue());
        });
        return temp;
    }

    void run() throws Exception {
        is = System.in;//oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);

        long s = System.currentTimeMillis();
        solve();
        out.flush();
        tr(System.currentTimeMillis() - s + "ms");
    }

    public static void main(String[] args) throws Exception {
        new Codeforces().run();
    }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if (lenbuf == -1) {
            throw new InputMismatchException();
        }
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) {
                return -1;
            }
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b));
        return b;
    }

    private double nd() {
        return Double.parseDouble(ns());
    }

    private char nc() {
        return (char) skip();
    }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for (int i = 0; i < n; i++) {
            map[i] = ns(m);
        }
        return map;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = ni();
        }
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

    private void tr(Object... o) {
        if (!oj) {
            System.out.println(Arrays.deepToString(o));

        }
    }

    class Pair {

        /*SORTING PAIRS BY COMPARING Y OF PAIR.
    Pair[] p=new Pair[n];
    p[i]=new Pair(i,ni());
    Arrays.sort(p,( p1, p2) -> {return p1.y-p2.y;});
         */
        int x;
        int y;

        Pair(int u, int v) {
            x = u;
            y = v;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (!(o instanceof Pair)) {
                return false;
            }
            Pair key = (Pair) o;
            return x == key.x && y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.NavigableMap;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

public class d324 {

	static class Task {

		public void Solve(InputReader in, PrintWriter out)
		{
			int n=in.nextInt();
			if(prime(n))
			{
				out.println("1");
				out.print(n);
			}
			else
			{
				n-=3;
				for(int i=n-2;i>=2;i--)
				{
					if(prime(i)&prime(n-i))
					{
						out.println("3");
						out.print("3"+" "+(i)+" "+(n-i));
						break;
					}
				}
			}
		}

     }

	static boolean prime(int n)
	{
		for(int i=2;i<=Math.sqrt(n);i++)
		{
			if(n%i==0)
				return false;
		}
		return true;
	}

	public static void SieveOfErathostenes(int n,boolean sieve[]){
  		int cnt = 0;
  		for(int i = 2 ; i <= n ; i++)
  			if(sieve[i] == false){
  			    cnt++;
  				for(int j = i + i ; j <= n ; j += i)
  					sieve[j] = true;
  			}
  	}

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.Solve(in,out);
        out.close();
    }

    static int[][] sort2D(int arr[][]){
        Arrays.sort(arr,new java.util.Comparator<int[]>(){
        public int compare(int[] a, int[] b) {
            return Integer.compare(a[0], b[0]);
        }});
        return arr;
    }

	static int[] di={1,0,-1,0,1,-1,-1,1};
	static int[] dj={0,1,0,-1,1,1,-1,-1};

	static class point{
		int x;int y;
		public point(int x,int y){
			this.x=x;
			this.y=y;
		}
	}

    static void sort(int arr[]){
		int cnt[]=new int[(1<<16)+1];
		int ys[]=new int[arr.length];
		for(int j=0;j<=16;j+=16){
			Arrays.fill(cnt,0);
			for(int x:arr){cnt[(x>>j&0xFFFF)+1]++;}
			for(int i=1;i<cnt.length;i++){cnt[i]+=cnt[i-1];}
			for(int x:arr){ys[cnt[x>>j&0xFFFF]++]=x;}
			{ final int t[]=arr;arr=ys;ys=t;}
		}
		if(arr[0]<0||arr[arr.length-1]>=0)return;
		int i,j,c;
		for(i=arr.length-1,c=0;arr[i]<0;i--,c++){ys[c]=arr[i];}
		for(j=arr.length-1;i>=0;i--,j--){arr[j]=arr[i];}
		for(i=c-1;i>=0;i--){arr[i]=ys[c-1-i];}
	}

    static int abs(int x){if(x>=0)return x;else return -x;}
    static int gcd(int a,int b){return b==0?a:gcd(b,a%b);}
    static int min(int x,int y){return x<y?x:y;}
    static int min(int x,int y,int z){return x<y?(x<z?x:z):(y<z?y:z);}
    static int max(int x,int y){return x>y?x:y;}
    static int max(int x,int y,int z){return x>y?(x>z?x:z):(y>z?y:z);}

    static void joutArray(int arr[]){
    	for(int i=0;i<arr.length;i++){
    		System.out.print(arr[i]+" ");
    	}
    	System.out.println();
    }

    static void joutArray(int arr[][],int n,int m){
    	for(int i=0;i<n;i++){
    		for(int j=0;j<m;j++)
    		System.out.print(arr[i][j]+" ");
    		System.out.println();
    	}
    	System.out.println();
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() {
			String fullLine=null;
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					fullLine=reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				return fullLine;
			}
			return fullLine;
		}

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

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

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

        public int[] nextIntArray(int n) {
        	int arr[]=new int[n];
        	for(int i=0;i<n;i++)
        		arr[i]=nextInt();
        	return arr;
        }

        public char[] nextCharArray(){
        	char arr[]=next().toCharArray();
        	return arr;
        }

        public HashMap<Integer,Integer> inHashMap(int n){
        	HashMap<Integer,Integer> hm=new HashMap<>();
        	for(int i=0;i<n;i++){
    			int num=nextInt();
    			hm.put(num,hm.get(num)==null?1:hm.get(num)+1);
    		}
        	return hm;
        }
     }

   }

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class P584D {

  static BufferedReader in;
  static PrintWriter out;
  static StringTokenizer tok;

  static void solve() throws Exception {
    int n = nextInt();
    int x = n;
    while (!check(x)) {
      x -= 2;
    }
    if (x == n) {
      out.println(1);
      out.println(n);
    } else if (check(n - x)) {
      out.println(2);
      out.println(x + " " + (n - x));
    } else {
      out.println(3);
      for (int i = 2, j = n - x - 2; i <= j; i++, j--) {
        if (check(i) && check(j)) {
          out.println(x + " " + i + " " + j);
          break;
        }
      }
    }
  }

  static boolean check(int num) {
    for (int i = 2; i * i <= num; i++) {
      if (num % i == 0) {
        return false;
      }
    }
    return num != 1;
  }

  public static void main(String args[]) {
    try {
      in = new BufferedReader(new InputStreamReader(System.in));
      out = new PrintWriter(new OutputStreamWriter(System.out));
      solve();
      in.close();
      out.close();
    } catch (Throwable e) {
      e.printStackTrace();
      System.exit(1);
    }
  }

  static int nextInt() throws IOException {
    return Integer.parseInt(next());
  }

  static int[] nextIntArray(int len, int start) throws IOException {
    int[] a = new int[len];
    for (int i = start; i < len; i++)
      a[i] = nextInt();
    return a;
  }

  static long nextLong() throws IOException {
    return Long.parseLong(next());
  }

  static long[] nextLongArray(int len, int start) throws IOException {
    long[] a = new long[len];
    for (int i = start; i < len; i++)
      a[i] = nextLong();
    return a;
  }

  static String next() throws IOException {
    while (tok == null || !tok.hasMoreTokens()) {
      tok = new StringTokenizer(in.readLine());
    }
    return tok.nextToken();
  }

}

import java.io.*;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;

/**
 * Created by WiNDWAY on 4/18/16.
 */

public class Codeforces_round_324_div_2_DimaAndLisa {

    public static HashSet<Integer> set = new HashSet<>();
    public static void main(String[] args) {
        FScanner input = new FScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out), true);
        int n = input.nextInt();
        if(isPrime(n)) {
            out.println(1);
            out.println(n);
            System.exit(0);
        }
        sieve();
        int biggestPrime = 0;
        for (int i = n; i >= 2; i--) {
            if(isPrime(i)) {
                biggestPrime = i;
                break;
            }
        }
        int result = n - biggestPrime;
        if(set.contains(result)) {
            System.out.println(2);
            System.out.println(result + " " + biggestPrime);
            System.exit(0);
        } else {
            for(int x : set) {
                int lastResult = result - x;
                if(set.contains(lastResult)) {
                    System.out.println(3);
                    System.out.println(biggestPrime + " " + lastResult + " " + x);
                    System.exit(0);
                }
            }
        }
        out.close();
    }

    public static boolean isPrime(int n) {
        if (n <= 1) {
            return false;
        }
        if (n <= 3) {
            return true;
        }

        if (n % 2 == 0 || n % 3 == 0) {
            return false;
        }

        for (int i = 5; i * i <= n; i = i + 6) {
            if (n % i == 0 || n % (i + 2) == 0) {
                return false;
            }
        }
        return true;
    }

    public static void sieve() {
        boolean prime[] = new boolean[400];
        Arrays.fill(prime, true);

        for (int p = 2; p * p < prime.length; p++) {
            if (prime[p]) {
                for (int i = p * 2; i < prime.length; i += p) {
                    prime[i] = false;
                }
            }
        }

        for (int p = 2; p < prime.length; p++) {
            if (prime[p]) {
                set.add(p);
            }
        }
    }

    public static PrintWriter out;

    public static class FScanner {
        BufferedReader br;
        StringTokenizer st;

        public FScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}

import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
	static int mod = 1000000007;

	public static void main(String[] args) {
		// code
		Scanner scn = new Scanner(System.in);

		int t = 1;
		while (t > 0) {
			t--;
			int n = scn.nextInt();
			if (n == 3) {
				System.out.println(1 + "\n" + 3);
				continue;
			}

			int p = n - 2;

			while (checkprime(p) == false) {
				p--;
				continue;
			}
			//System.out.println(p);
			int x = n - p;
			for (int i = 2; i <= x; i++) {
				if (checkprime(i) && checkprime(x - i)) {
					if (x - i == 0) {
						System.out.print("2" + "\n" + p + " " + i);
					} else {
						System.out.print("3" + "\n" + p + " " + i + " " + (x - i));
					}
					break;
				}
			}

		}
	}

	public static boolean checkprime(int n) {
		for (int i = 2; i <= Math.pow(n, 0.5); i++) {
			if (n % i == 0) {
				return false;
			}
		}
		return true;
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

public class Main {

    public static List<Integer> PRIMES = new ArrayList<>();

    public static void main(String[] args) throws Exception {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        InputReader inputReader = new InputReader(in);
        PrintWriter out = new PrintWriter(System.out);

        int n = inputReader.getNextInt();

        for(int i = 2; i < 35000; i++) {
            if(isPrime(i)) {
                PRIMES.add(i);
            }
        }

        if(isPrime(n)) {
            out.println(1);
            out.println(n);
        } else {
            if(isPrime(n-2)) {
                out.println(2);
                out.println((n-2) + " 2");
            } else {
                for (int i : PRIMES) {
                    if ((n - i) % 2 == 0 && isPrime((n - i) / 2)) {
                        out.println(3);
                        out.println(i + " " + ((n - i) / 2) + " " + ((n - i) / 2));
                        break;
                    }
                }
            }
        }

        in.close();
        out.close();
    }

    public static boolean isPrime(int x) {
        if(x < 2) {
            return false;
        }
        for(int j: PRIMES) {
            if(j * j > x) {
                break;
            }
            if(x % j == 0) {
                return false;
            }
        }
        return true;
    }

    public static class InputReader {

        static final String SEPARATOR = " ";

        String[] split;
        int head = 0;
        BufferedReader in;

        public InputReader(BufferedReader in) {
            this.in = in;
        }

        private void fillBuffer() throws IOException {
            if(split == null || head >= split.length) {
                head = 0;
                split = in.readLine().split(SEPARATOR);
            }
        }

        public String getNextToken() throws IOException {
            fillBuffer();
            return split[head++];

        }

        public int getNextInt() throws IOException {
            return Integer.parseInt(getNextToken());
        }

        public long getNextLong() throws IOException {
            return Long.parseLong(getNextToken());
        }
    }

    public static <T> String arrayToString(T[] arr) {
        StringBuilder stringBuilder = new StringBuilder();
        for(T x: arr) {
            stringBuilder.append(x + " ");
        }
        return stringBuilder.toString();
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.PrintWriter;

import java.text.*;
import java.math.BigInteger;

/**
 * @author : soumitri12
 */

public class Solution
{
    static class FastReader {

        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (final IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (final IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static class Pair {
		int ff,ss;
		public Pair(int ff,int ss) {
			this.ff=ff; this.ss=ss;
		}
    }

    static boolean isprime(long x){
        for(int i=2;i<=Math.sqrt(x);i++) {
            if(x%i==0) return false;
        } return true;
    }

    public static void main(String[] args) {
        final FastReader sc=new FastReader();
        final PrintWriter out=new PrintWriter(System.out);
        StringBuffer sb=new StringBuffer();
        // your code starts here
        long n=sc.nextLong();
        if(isprime(n)) sb.append("1\n"+n);
        else {
            if(isprime(n-2)) sb.append("2\n2 "+(n-2));
            else if(isprime(n-4)) sb.append("3\n2 2 "+(n-4));
            else
            {
                sb.append("3\n3 "); n-=3;
                for(int i=2;i<=Math.sqrt(n);i++) {
                    if(isprime(i) && isprime(n-i)) {
                        sb.append(i+" "+(n-i));  break;
                    }
                }
            }
        }
        out.print(sb.toString());
        out.close();
    }
}

import java.io.*;
import java.math.*;
import java.util.*;

public class Program {

    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;

    static final int MOD = 1000000007;
    static final double INF = 10000000000.0;

    boolean isPrime(int n)
    {
    	if (n == 1)
    		return false;
    	for(int i = 2; i*i <= n; i++)
    		if (n % i == 0)
    			return false;
    	return true;
    }

 	void solve() throws IOException {
 		int n = nextInt();
 		if (isPrime(n))
 		{
 			out.println(1);
 			out.println(n);
 		}
 		else if (n % 2 == 0)
 		{
 			for(int i = 1; i <= n; i+=2)
 			if (isPrime(i) && isPrime(n-i))
 			{
 	 			out.println(2);
 				out.println(i + " " + (n-1));
 				break;
 			}
 		}
 		else
 		{
 			for(int i = 1; i <= n; i+=2)
 			if (isPrime(i) && isPrime(n-i-3))
 			{
 				out.println(3);
 				out.println(i + " " + (n-i-3) + " " + 3);
 				break;
 			}
 		}
    }

    Program() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

    public static void main(String[] args) throws IOException {
        new Program();
    }

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

    String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    class Pair implements Comparable<Pair>{

        char first;
        int second;

        public Pair(char an1, int an2){
            first = an1;
            second = an2;
        }

        @Override
        public int compareTo(Pair o) {
            if (first - o.first == 0)
            	return second - o.second;
            else
            	return first - o.first;
        }
    }
}

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n;
        n = sc.nextInt();
        if(isPrime(n)){
            System.out.printf("1\n %d\n",n);
        }else if(isPrime(n-2)){
            System.out.printf("2\n 2 %d", n-2);
        }else{
            boolean fl = false;
            for(int i=3; i<=300 && !fl; i+=2){
                if(isPrime(i)){
                    int k = n-i;
                    if(isPrime(k)){
                        System.out.printf("2\n%d %d\n",i,k);
                        break;
                    }else{
                        for(int l=3; l<=300; l+=2){
                            if(isPrime(l) && isPrime(k-l)){
                                System.out.printf("3\n%d %d %d\n",i,k-l,l);
                                fl = true;
                                break;
                            }
                        }
                    }
                }
            }
        }
    }

    public static boolean isPrime(int n){
        if(n == 1) return false;
        for(int i=3; i*i <= n; i++){
            if(n%i == 0){
                return false;
            }
        }
        if(n != 2 && n%2 == 0) return false;
        return true;
    }
}

import java.io.*;
import java.util.*;
public class dimaandliA {
    public static void main(String[] args) throws Exception
    {
        InputReader in=new InputReader(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=in.nextInt();
        if(isPrime(n))
        {
            pw.println(1);
            pw.println(n);
        }
        else if(isPrime(n-2))
        {
            pw.println(2);
            pw.println(n-2+" "+2);
        }
        else
        {
        for(int i=3;;i+=2)
        {
            if(isPrime(i) && isPrime(n-i-3))
            {
                pw.println(3);
                pw.println(i+" "+(n-i-3)+" "+3);
                break;

            }
        }
        }

        pw.close();

    }

    public  static boolean isPrime(int num) {
        if (num == 2 ) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
        return true;
}

     static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }

            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

}

import java.lang.StringBuilder;
import java.util.Scanner;

public final class Main {

	public static boolean isPrime(long x) {
		if (x <= 0) {
			return false;
		}
		long a = (long) Math.sqrt(x);
		for (long p = 2; p <= a; p++) {
			if (x % p == 0) {
				return false;
			}
		}
		return true;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		if (isPrime(n)) {
			System.out.println("1\n" + n);
		} else if (isPrime(n - 2)) {
			System.out.println("2\n2 " + (n - 2));
		} else {
			for (long p = 2; p < n; p += 2) {
				if (!isPrime(n - p)) {
					continue;
				} else {
					for (long q = 2; q < p; q++){
			            if(!isPrime(q) || !isPrime(p - q)){
			            	continue;
			            } else {
				            System.out.println("3\n" + (n - p) + " " + (p - q) + " " + q);
				            return;
				        }
			        }
				}
			}
		}
	}
}

import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class D implements Runnable{

	Random rnd = new Random();

	void solve() throws IOException {
		int n = readInt();

		if (isPrime(n)) {
			out.println(1);
			out.println(n);
			return;
		}

		if (isPrime(n - 2)) {
			out.println(2);
			out.println(2 + " " + (n - 2));
			return;
		}

		int[] primes = new int[100510];
		primes[0] = 2;

		for (int x = 3, i = 1; i < primes.length; x += 2) {
			if (isPrime(x)) {
				primes[i++] = x;
			}
		}

		for (int prime : primes) {
			if (prime > n) break;
			if (isPrime(n - prime)) {
				out.println(2);
				out.println(prime + " " + (n - prime));
				break;
			} else if (isPrime(n - 2 - prime)) {
				out.println(3);
				out.println(2 + " " + prime + " " + (n - 2 - prime));
				break;
			} else if (isPrime(n - 3 - prime)) {
				out.println(3);
				out.println(3 + " " + prime + " " + (n - 3 - prime));
				break;
			}
		}
	}

	Set<Integer> primeSet;

	private boolean isPrime(int x) {

		if (x == 1) return false;
		if (x == 2) return true;
		if (x % 2 == 0) return false;

		for (int d = 3; d * d <= x; d += 2) {
			if (x % d == 0) return false;
		}

		return true;
	}

	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok = new StringTokenizer("");

	public static void main(String[] args){
		new D().run();
	}

	public void run(){
		try{
			long timeBegin = System.currentTimeMillis();
			Locale.setDefault(Locale.US);

			init();
			solve();

			out.close();

			long timeEnd = System.currentTimeMillis();
			System.err.println("Time = " + (timeEnd - timeBegin));
		}catch (Exception e){
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	String readString() throws IOException{
		while(!tok.hasMoreTokens()){
			try{
				tok = new StringTokenizer(in.readLine());
			}catch (Exception e){
				return null;
			}
		}

		return tok.nextToken();
	}

	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}

	void init() throws FileNotFoundException{
		Locale.setDefault(Locale.US);

		if (ONLINE_JUDGE){
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		}else{
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
	}
}

//package CodeForces.Round324;

import java.util.*;
import java.util.stream.LongStream;
import java.util.stream.Stream;

/**
 * Created by Ilya Sergeev on 09.10.2015.
 */
public class EDimaLiza {
/*
    public static boolean[] fillSieve(int n){
        boolean[] primes=new boolean[n+1];
        Arrays.fill(primes, true);
        primes[0] = primes[1] = false;
        for (int i = 2; i < primes.length; i++) {
            if (primes[i]) {
                for (int j=2;i*j<primes.length;j++) {
                    primes[i*j]=false;
                }
            }
        }
        return primes;
    }

    public static LinkedList<Integer> count(List<Integer> primes, int n){
        LinkedList<Integer> list = new LinkedList<>();
        int[] ost = new int[n];
        if(primes.contains(n)){
            list.push(n);
            return list;
        }
        for (int i = 0; i < ost.length; i++) {
            ost[i] = -1;
        }
        for (int i = 0; i < primes.size(); i++) {
            if(n == primes.get(i)*3){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(primes.get(i));
                return list;
            }
            ost[n - primes.get(i)] = primes.get(i);
        }
        for (int i = 0; i < primes.size(); i++) {
            int c = primes.get(i)*2;
            if(n > c && ost[c] != -1){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(ost[c]);
                return list;
            }
        }
        return null;
    }
*/
    public static boolean isPrime(long number){
        return number > 1 &&
                LongStream.range(2, (long) Math.sqrt(number)+1)
                          .noneMatch(i -> number % i == 0);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        List<Long> list = new LinkedList<>();
        if(n > 300){
            long p = n - 300;
            Optional<Long> t = Stream.iterate(n-1, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(300)
                    .findAny();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i <= n - list.get(0); i++) {
                    if(i ==  n - list.get(0)){
                        list.add((long) i);
                        break outer;
                    }
                    if(isPrime(i)){
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() > 1){
                    System.out.println(list.size());
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
        else{
            Optional<Long> t = Stream.iterate(n, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(n)
                    .findFirst();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i <= n - list.get(0); i++) {
                    if(isPrime(i)){
                        if(i ==  n - list.get(0)){
                            list.add((long) i);
                            break outer;
                        }
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() >= 1){
                    System.out.println(list.size());
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
    }
}

import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class D {
    public static boolean isPrime(long n){
        if(n==1)return false;
        for(int i=2;i*i<=n;i++){
            if(n%i==0){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        long n = sc.nextInt();
        long a = 0;
        long b = 0;
        long c = 0;
        long t = 0;
        if(isPrime(n)){
            pw.println(1);
            pw.println(n);
            pw.flush();
            pw.close();
            return;
        }
        for(int i=2;i<Math.min(1000,n-1);i++){
            if(isPrime(n-i)){
                t = i;
                a =  n-i;
                break;
            }
        }
        if(isPrime(t)){
            pw.println(2);
            pw.println(a + " " + t);
        }else{
            for(int i=2;i<Math.min(1000,t-1);i++){
                if(isPrime(t-i) && isPrime(i)){
                    b = t-i;
                    c = i;
                    break;
                }
            }
            pw.println(3);
            pw.println(a + " " + b+ " " + c);
        }
        pw.flush();
        pw.close();
    }
    static class Pair implements Comparable<Pair>{
        long x;
        int index;
        public Pair(long x,int index){
            this.x= x;
            this.index = index;
        }
        public int compareTo(Pair p){
            return Long.compare(this.x,p.x);
        }

    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++)
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();

        }
    }
}

import java.util.*;
import java.io.*;

public class A {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int n = in.nextInt();
        if (n == 3) {
            out.println("1 3");
            return;
        }
        for (int i = 2; i * i <= n; i++) {
            if (n % i == 0) {
                break;
            }
            if ((i + 1) * (i + 1) > n) {
                out.println(1 + " " + n);
                return;
            }
        }
        for (int i = 2; i * i <= n - 2; i++) {
            if ((n - 2) % i == 0) {
                break;
            }
            if ((i + 1) * (i + 1) > n - 2) {
                out.println(2 + " " + (n - 2) + " " + 2);
                return;
            }
        }
        n -= 3;
        for (int i = 2; i <= n; i++) {
            boolean flag = false;
            for (int j = 2; j * j <= i; j++) {
                if (i % j == 0) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                continue;
            }
            for (int j = 2; j * j <= n - i; j++) {
                if ((n - i) % j == 0) {
                    break;
                }
                if ((j + 1) * (j + 1) > n - i) {
                    out.println(3 + " " + 3 + " " + (n - i) + " " + i);
                    return;
                }
            }
        }
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

    public static void main(String[] arg) {
        new A().run();
    }
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class C324D
{

private static StringTokenizer st;

    public static void nextLine(BufferedReader br) throws IOException
    {
        st = new StringTokenizer(br.readLine());
    }

    public static int nextInt()
    {
        return Integer.parseInt(st.nextToken());
    }

    public static String next()
    {
        return st.nextToken();
    }

    public static long nextLong()
    {
        return Long.parseLong(st.nextToken());
    }

    public static double nextDouble()
    {
        return Double.parseDouble(st.nextToken());
    }

    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        nextLine(br);
        long n = nextLong();
        long v = n;
        while (true)
        {
            if (BigInteger.valueOf(v).isProbablePrime(200)) break;
            v--;
        }
        if (v == n)
        {
            System.out.println(1);
            System.out.println(v);
            return;
        }
        if (n - v == 4)
        {
            System.out.println(3);
            System.out.println(v + " 2 2");
            return;
        }
        if (n - v == 2)
        {
            System.out.println(2);
            System.out.println(v + " 2");
            return;
        }

        boolean[] primes = genPrimes(1000000);

        for (int i = 3; i <= (n - v) / 2; i++)
        {
            if (primes[i] && primes[(int)(n-v-i)])
            {
                System.out.println(3);
                System.out.println(v + " " + i + " " + (n-v-i));
                return;
            }
        }
    }

    static boolean[] genPrimes(int n)
    {
        boolean[] primes = new boolean[n];
        Arrays.fill(primes, true);
        primes[1] = false;
        for (int i = 2; i < n; i++)
        {
            if (!primes[i]) continue;
            for (int j = i*2; j < n; j+=i)
            {
                primes[j] = false;
            }
        }
        return primes;
    }

}

import java.util.Scanner;

public class coins{

	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		int x = s.nextInt();
		int v = x;
		int highP = x;
		int count = 0;
		StringBuilder output = new StringBuilder();

		while(v != 0){
			for(int i = highP; i >= 2; i--)
			{
				if(isPrime(i) && i <= v && v-i != 1){
					if(count == 1 && !isPrime(v-i) && v-i!= 0) continue;
					highP = v-i;
					v -= i;
					output.append(i + " ");
					count++;
					break;
				}
			}
		}
		System.out.println(count);
		System.out.println(output);

	}

	public static boolean isPrime(int num) {
		if (num % 2 == 0 && num != 2) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
        return true;
    }

}

import java.util.Scanner;
import java.util.ArrayList;
import java.util.HashSet;

public class Lisa{
	ArrayList<Integer> lst;
	HashSet<Integer> set;
	public static void main(String[] args) {
		Lisa exe =  new Lisa();
		exe.begin();
	}

	void build_primes(int n) {
		lst = new ArrayList<Integer>();
		set = new HashSet<Integer>();
		boolean prime[] = new boolean[100000000];
		for(int i=0;i<n;++i)
			prime[i] = true;

		set.add(2);
		lst.add(2);

		for(int i=3;i<n;i+=2) {
			if(prime[i]) {
				set.add(i);
				lst.add(i);
				for(int j=2*i;j<n;j+=i) {
					prime[j] = false;
				}
			}
		}
	}

	int closestPrime(int n) {
		if(isPrime(n)) return n;

		for(int i=n-4;i>0;--i){
			if(isPrime(i)) return i;
		}
		return -1;
	}

	boolean isPrime(int n) {
		int root;
		int div = 2;
		int ori = n;

		while(n%div==0)	n/=2;

		div = 3;
		root = (int)Math.sqrt(n)+1;
		while(div<root) {
			while(n%div==0) {
				n/=div;
				root = (int)Math.sqrt(n)+1;
			}

			div+= 2;
		}
		return (n==ori)?true:false;
	}

	void begin() {
		Scanner l = new Scanner(System.in);
		int n = l.nextInt();

		int bp = closestPrime(n);
		if(bp == n){
			System.out.println(1);
			System.out.println(n);
		} else {
			System.out.println(3);
			build_primes(n-bp);
			int a,b;
			a = b = 0;
			for(int i=0;i<lst.size();++i) {
				a = lst.get(i);
				b = n-bp-a;
				if(set.contains(b)) {
					break;
				}
			}

			System.out.println(bp+" "+a+" "+b);
		}

	}
}

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.StringTokenizer;

public class D
{
	public static final Random RANDOM = new Random(System.currentTimeMillis());
	private BufferedReader bufferedReader;
	private StringTokenizer stringTokenizer;
	private PrintWriter out;

	public D()
	{
		this(new BufferedReader(new InputStreamReader(System.in)));
	}

	public D(BufferedReader bufferedReader)
	{
		this.bufferedReader = bufferedReader;
		this.stringTokenizer = null;
		this.out = new PrintWriter(new BufferedOutputStream(System.out));
	}

	public D(String file) throws FileNotFoundException
	{
		this(new BufferedReader(new InputStreamReader(new FileInputStream(file))));
	}

	private String next() throws IOException
	{
		while ((this.stringTokenizer == null) || (!this.stringTokenizer.hasMoreTokens()))
		{
			this.stringTokenizer = new StringTokenizer(this.bufferedReader.readLine());
		}
		return stringTokenizer.nextToken();
	}

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

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

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

	public String nextLine() throws IOException
	{
		return this.bufferedReader.readLine();
	}

	public void close()
	{
		out.close();
	}

	public static void main(String[] args)
	{
		D template = new D();
		try
		{
			template.solve();
		}
		catch (IOException exception)
		{
			exception.printStackTrace();
		}
		template.close();
	}

	public static int convert(int offset, boolean[] sieve, int[] primes, int primesCount)
	{
		for (int index = 0; index < sieve.length; index++)
		{
			if (sieve[index])
			{
				primes[primesCount] = offset + index;
				primesCount += 1;
			}
		}
		return primesCount;
	}

	public static boolean[] generateSieve(int size)
	{
		boolean[] result = new boolean[size];
		for (int index = 0; index < size; index++)
		{
			result[index] = true;
		}
		return result;
	}

	public static int[] generatePrimes(int n)
	{
		int[] primes = new int[(int) (n / Math.log(n) * 2)];
		int primesCount = 0;
		int segmentSize = (int) Math.sqrt(n);
		if (segmentSize * segmentSize < n)
		{
			segmentSize += 1;
		}
		int sqrt4 = (int) Math.sqrt(segmentSize);
		boolean[] sieve = generateSieve(segmentSize);
		sieve[0] = false;
		sieve[1] = false;
		for (int prime = 0; prime <= sqrt4; prime++)
		{
			if (sieve[prime])
			{
				for (int mul = 2; prime * mul < segmentSize; mul++)
				{
					sieve[prime * mul] = false;
				}
			}
		}
		primesCount = convert(0, sieve, primes, primesCount);
		int primesCountSieve = primesCount;
		for (int segment = 1; segment < segmentSize; segment++)
		{
			sieve = generateSieve(segmentSize);
			int offset = segmentSize * segment;
			for (int indexPrime = 0; indexPrime < primesCountSieve; indexPrime++)
			{
				int prime = primes[indexPrime];
				for (int mul = offset / prime; prime * mul - offset < segmentSize; mul++)
				{
					if (prime * mul - offset >= 0)
					{
						sieve[prime * mul - offset] = false;
					}
				}
			}
			primesCount = convert(offset, sieve, primes, primesCount);
		}
		int[] result = new int[primesCount];
		for (int index = 0; index < primesCount; index++)
		{
			result[index] = primes[index];
		}
		return result;
	}

	public static boolean isPrime(int[] primes, int n)
	{
		boolean result = true;
		for (int indexPrime = 0; result && indexPrime < primes.length; indexPrime++)
		{
			if (primes[indexPrime] < n)
			{
				result &= n % primes[indexPrime] != 0;
			}
		}
		return result;
	}

	public static int[] solve(int n)
	{
		int[] result;
		if (n == 3)
		{
			result = new int[]
			{ 3 };
		}
		else
		{
			if (n == 5)
			{
				result = new int[]
				{ 5 };
			}
			else
			{
				result = null;
				int[] primes = generatePrimes((int) (n / Math.log(n) + 1));
				for (int indexPrime0 = 0; result == null && indexPrime0 <primes.length; indexPrime0++)
				{
					int prime0 = primes[indexPrime0];
					for (int indexPrime1 = 0; result == null && indexPrime1 < indexPrime0; indexPrime1++)
					{
						int prime1 = primes[indexPrime1];
						int prime2 = n - prime0 - prime1;
						if (isPrime(primes, prime2))
						{
							result = new int[3];
							result[0] = prime0;
							result[1] = prime1;
							result[2] = prime2;
						}
					}
				}
			}
		}
		return result;
	}

	public void solve() throws IOException
	{
		int n = nextInt();
		int[] primes = solve(n);
		out.println(primes.length);
		for (int prime : primes)
		{
			out.print(prime + " ");
		}
		out.println();
	}
}

import java.math.BigInteger;
import java.util.Scanner;

public class D {

    private static final int CERTAINTY = 1000000;

    public static void main(String[] args) {
        BigInteger n = new BigInteger(new Scanner(System.in).next());

        if (n.isProbablePrime(CERTAINTY)) {
            System.out.println(1);
            System.out.println(n);
            return;
        }
        BigInteger cur = new BigInteger(n.toString());
        BigInteger uno = new BigInteger("1");
        while (!cur.isProbablePrime(CERTAINTY)) {
            cur = cur.subtract(uno);
        }
        n = n.subtract(cur);

        if (n.isProbablePrime(CERTAINTY)) {
            System.out.println(2);
            System.out.println(cur + " " + n);
            return;
        }
        System.out.println(3);
        System.out.print(cur + " ");

        cur = new BigInteger(n.toString());
        while (!cur.isProbablePrime(CERTAINTY) || !n.subtract(cur).isProbablePrime(CERTAINTY)) {
            cur = cur.subtract(uno);
        }

        System.out.println(cur + " " + n.subtract(cur));

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Morgrey
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            if (IntegerUtils.isPrime(n)) {
                out.printLine(1);
                out.printLine(n);
                return;
            }
            boolean flag = false;
            if (n % 2 != 0) {
                flag = true;
                n -= 3;
            }
            for (int i = 2; i < 1000000; ++i)
                if (IntegerUtils.isPrime(i) && IntegerUtils.isPrime(n - i)) {
                    if (flag) {
                        out.printLine(3);
                        out.printLine(3 + " " + i + " " + (n - i));
                        return;
                    } else {
                        out.printLine(2);
                        out.printLine(i + " " + (n - i));
                        return;
                    }
                }
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void printLine(int i) {
            writer.println(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class IntegerUtils {
        public static boolean isPrime(long number) {
            if (number < 2)
                return false;
            for (long i = 2; i * i <= number; i++) {
                if (number % i == 0)
                    return false;
            }
            return true;
        }

    }
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class cf584d implements Runnable {
	public static final String taskname = cf584d.class.getName();

	public StringTokenizer strtok;
	public BufferedReader inr;
	public PrintWriter out;

	public static void main(String[] args) {
		new Thread(new cf584d()).start();
	}

	public void run() {
		Locale.setDefault(Locale.US);
		boolean oj = System.getProperty("ONLINE_JUDGE") != null;
		try {
			inr = new BufferedReader(oj ? new InputStreamReader(System.in, "ISO-8859-1") : new FileReader(taskname + ".in"));
			out = new PrintWriter(oj ? new OutputStreamWriter(System.out, "ISO-8859-1") : new FileWriter(taskname + ".out"));
			solve();
		} catch (Exception e) {
			if (!oj)
				e.printStackTrace();
			System.exit(9000);
		} finally {
			out.flush();
			out.close();
		}
	}

	public String nextToken() throws IOException {
		while (strtok == null || !strtok.hasMoreTokens()) {
			strtok = new StringTokenizer(inr.readLine());
		}
		return strtok.nextToken();
	}

	public int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	// Solution

	boolean isPrime(int i) {
		for (int d = 2; d <= Math.sqrt(i) + 1; d++) {
			if (i % d == 0) {
				return false;
			}
		}
		return true;
	}

	public void solve() throws NumberFormatException, IOException {
		ArrayList<Integer> primes = new ArrayList<Integer>();
		primes.add(2);
		for (int i = 2; i < 5000; i++) {
			if (isPrime(i)) {
				primes.add(i);
			}
		}

		HashSet<Integer> pregen = new HashSet<Integer>(primes);
		for (int i : primes) {
			for (int j : primes) {
				pregen.add(i + j);
			}
		}

		int n =  nextInt();
		if (Collections.binarySearch(primes, n - 4) >= 0) {
			out.printf("3\n2 2 %d", n - 4);
			return;
		}

		if ((new BigInteger(((Integer)(n)).toString())).isProbablePrime(15)) {
			out.printf("1\n%d", n);
			return;
		}

		for (int v : pregen) {
			if (n - v < 2) {
				continue;
			}
			BigInteger nnn = new BigInteger(((Integer)(n - v)).toString());
			if (nnn.isProbablePrime(15)) {
				// reconstructing
				if (Collections.binarySearch(primes, v) >= 0) {
					out.printf("2\n%d %d", v, n - v);
					return;
				}
				else {
					for (int vv : primes) {
						if (Collections.binarySearch(primes, v - vv) >= 0) {
							out.printf("3\n%d %d %d", vv, v - vv, n - v);
							return;
						}
					}
				}
			}

		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class DimaAndLisa {

    static boolean isPrime(int n)
    {
        for(int i=2; i<= Math.sqrt(n); i++)
            if(n%i == 0) return false;
        return true;
    }

    static int adjPrime(int n)
    {
        for(int i=n; i>=2; i--)
        {
            if(isPrime(i))
                return i;
        }
        return 1;
    }

    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        if(isPrime(n))
        {
            System.out.println(1);
            System.out.println(n);
            return;
        }
        int p = adjPrime(n);
        n -= p;
        int m = 0;
        int z = 0;

        boolean found = false;
        int k = n;

        for(int i=2; i<=n; i++)
        {
            if(isPrime(i))
                if(isPrime(n-i) && (n-i) != 1)
                {
                    m = i;
                    z = n-i;
                    break;
                }
        }

        if(m != 0 && z != 0)
        {
            System.out.println(3);
            System.out.println(p + " " + m + " " + z);
            return;
        }
        if(m == -1 && z != 0)
        {
            System.out.println(2);
            System.out.println(p + " " + z);
            return;
        }
        if(z == 0 && m != 0)
        {
            System.out.println(2);
            System.out.println(p + " " + m);
            return;
        }

    }
}

import java.math.*;
import java.util.*;

public class Lisa
{
    public static void main(String []av) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        boolean isPrime = BigInteger.valueOf(n).isProbablePrime(10);
        if (isPrime) {
            System.out.println(1);
            System.out.println(n);
        } else {
            int [] primes = generatePrimes(10000);
            for (int p : primes) {
                int np = n - 3 - p;
                boolean good = BigInteger.valueOf(np).isProbablePrime(12);
                if (good) {
                    System.out.println(3);
                    System.out.println(3 + " " + p + " " + np);
                    return;
                }
            }
            // http://www.primepuzzles.net/puzzles/puzz_558.htm
            throw new Error("don't trust the internet");
        }
    }

    /* returns boolean array a[] such that a[p] == true iff p is prime. */
    static boolean [] sieve(int N) {
        boolean [] a = new boolean[N+1];
        Arrays.fill(a, true);
        a[0] = a[1] = false;
        for (int p = 2; p * p <= N; p++)
            if (a[p]) {
                // Iterate through all multiples m of the prime and mark
                // them as not prime.
                for (int m = p * p; m <= N; m += p)
                    a[m] = false;
            }
        return a;
    }

    /* generate all prime numbers from 2..N, inclusive */
    static int [] generatePrimes(int N) {
        List<Integer> primes = new ArrayList<Integer>();
        boolean [] isPrime = sieve(N);
        for (int i = 0; i <= N; i++)
            if (isPrime[i])
                primes.add(i);
        int [] pa = new int[primes.size()];
        for (int i = 0; i < pa.length; i++)
            pa[i] = primes.get(i);
        return pa;
    }
}

import java.io.*;
import java.util.*;

@SuppressWarnings("unused")
public class A {
	public  static  FastScannerA scan = new FastScannerA();
	public static PrintWriter out = new PrintWriter(System.out);
	static long mad=(long) Math.pow(10, 9)+7;
	static boolean isPrime(int x) {
		if(x==1) return false;
		for(int i=2;i*i<=x;i++) {
			if(x%i==0) {
				return false;
			}
		}
		return true;
	}

	public static void solve () {
		int n=scan.nextInt();
		int rem=0;
		for(int i=n;i>1;i-=2) {
			if(isPrime(i)) {
				rem=n-i;
				break;
			}
		}
		if(rem==0) {
			out.println(1+"\n"+n);
			return;
		}
		if(isPrime(rem)) {
			out.println(2+"\n"+(n-rem)+" "+rem);
			return;
		}
		for(int i=2;i<=rem-2;i++) {
			if(isPrime(i) && isPrime(rem-i)) {
				out.println(3+"\n"+(n-rem)+" "+(rem-i)+" "+ i);
				return;
			}
		}
	}
	public static void main(String[] args) {

		solve();
		out.close();
	}

}
class FastScannerA {
	BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st= new StringTokenizer("");
	String next() {
		while (!st.hasMoreTokens())
			try {
				st=new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		return st.nextToken();
	}
	int nextInt() {
		return Integer.parseInt(next());
	}
	int[] readArray(int n) {
		int[] a=new int[n];
		for (int i=0; i<n; i++) a[i]=nextInt();
		return a;
	}
	long nextLong() {
		return Long.parseLong(next());
	}
	void sort(long[] a) {
		ArrayList<Long> l=new ArrayList<>();
		for (long i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

}

import java.util.Scanner;
public class dada {

	public static void main(String[] args) {

		Scanner scan = new Scanner (System.in);
		int n,k=0;
		n=scan.nextInt();
		if(judge(n)){
			System.out.println(1);
			System.out.println(n);
		}
		else if(judge(n-2)){
			System.out.println(2);
			System.out.printf("2 %d\n",n-2);

		}
		else if(judge(n-4)){
			System.out.println(3);
			System.out.printf("2  2 %d\n",n-4);
		}
		else {
			for( int i=n;i>=1;i--){
				if(judge(i)){
					k = i;
					break;
				}
			}
				if(judge(n - k)){

					System.out.println(2);
					System.out.printf("%d %d\n",k,n-k);
		  }
				else{
				    for(int i=2;i<=n-k;i++)
				    {
				        if(judge(i)&&judge(n-k-i))
				        {
				        	System.out.println(3);
				        	System.out.printf("%d %d %d\n",i,n-k-i,k);
				            break;
				        }
				    }
				}

		}

	}
	public static boolean judge(int a){
		if(a == 2 || a ==3) return true;
		else{
			for(int i=2;i<=Math.sqrt(a);i++){
				if(a%i==0) return false;
			}
			return true;

		}

	}

}

import java.util.Scanner;

public class Main
{
    private static boolean isPrime(int x)
    {
        double d = Math.sqrt((double) x);
        int s = (int) d;
        for (int i = 2; i <= s; i++)
        {
            if (x % i == 0)
            {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        int n = Integer.parseInt(s1);
        int a = 0, b = 0;
        int k = 0;
        int res = 0;
        if (isPrime(n))
        {
            res = n;
            k = 1;
            System.out.println(k);
            System.out.println(res);
            return;
        }
        double t1 = Math.sqrt((double) n);
        int s2 = (int) t1;

        for (int i = 2; i <= s2; i++)
        {
            if (isPrime(i) && isPrime(n - i))
            {
                a = i;
                b = n - i;
                System.out.println(2);
                System.out.println(a + " " + b);
                return;
            }
        }

        int t = n - 5;
        double d = Math.sqrt((double) t);
        int s = (int) d;

        for (int i = 2; i <= s; i++)
        {
            if (isPrime(i) && isPrime(t - i))
            {
                a = i;
                b = t - i;
                System.out.println(3);
                System.out.println(5 + " " + a + " " + b);
                return;
            }
        }

    }
}
// if (isPrime(n))
// {
// res = n;
// k = 1;
// System.out.println(k);
// System.out.println(res);
// return;
// }
//
// if (a == 0 && b == 0)
// {
// int x = n - 5;
// for (int i = 2; i <= x / 2; i++)
// {
// if (isPrime(i) && isPrime(x - i))
// {
// a = i;
// b = x - i;
// }
// }
// System.out.println(3);
// System.out.println(5 + " " + a + " " + b);
// return;
// }
// if (res == 0)
// {
// for (int i = 2; i <= n / 2; i++)
// {
// if (isPrime(i) && isPrime(n - i))
// {
// a = i;
// b = n - i;
// }
// }
// System.out.println(2);
// System.out.println(a + " " + b);
// return;
// }

import java.util.*;
import java.math.*;
public class CF324D {
	public static void main(String[] args){
		Scanner kb = new Scanner(System.in);
	    int n = kb.nextInt();
	    int start = n - 2;
	    if(p(n))
	    {
	        System.out.println("1\n"+n);
	        return;
	    }
	    while(true)
	    {
	        if(p(start))
	        {
	            int left = n - start;
	            if(p(left))
	            {
	                System.out.println("2\n"+start+" "+left);
	                return;
	            }
	            for(int j = 2; j<=left-2; j++) if(p(j) && p(left-j))
	            {
	                System.out.println("3\n"+start+" "+j+" "+(left-j));
	                return;
	            }
	        }
	        start--;
	    }
	}
	static boolean p(int n)
	{
	    if(n < 2) return false;
	    if(n > 1e5) return BigInteger.valueOf(n).isProbablePrime(40);
	    for(int i = 2; i<=Math.sqrt(n); i++) if(n%i == 0) return false;
	    return true;
	}
}

import java.util.Scanner;

public class DD {
	public static void main(String[] args) {
		Scanner sanat = new Scanner(System.in);
		int n = sanat.nextInt();
		if(isprime(n)){
			System.out.println("1");
			System.out.println(n);
			return;
		}
		if(isprime(n-2)){
			System.out.println("2");
			System.out.print("2"+" "+(n-2));
			return;
		}
		int m = 3000006;
		boolean []prime = new boolean[m];
		prime[1] = true;
		for (int i = 2; i < m; i++) {
			if(!prime[i]){
				int k =2;
				while(k*i<m){
					prime[k*i]=true;
					k++;
				}
			}
		}
		int cnt = 0;
		int []primes = new int[m];
		for (int i = 2; i <m; i++) {
			if(!prime[i]){
				primes[++cnt]=i;
			}
		}
		for (int i = 2; i <= cnt; i++) {

			int s = (n-primes[i])/2;
			if(s%2==1 && isprime(s) ){
				System.out.println(3);
				System.out.print(primes[i]+" "+s+" "+s);
				return;
			}
		}

	}

	private static boolean isprime(int i) {
		for (int j = 2; j <= Math.sqrt(i); j++) {
			if(i%j==0)
				return false;
		}
		return true;
	}
}

import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Created by Timur on 12.12.2016.
 */
public class _584D {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();

        if(isPrime(n)){
            out.println(1);
            out.print(n);
        }else{
            if(n % 2 == 0){
                out.println(2);
                int primes[] = findTwoPrimes(n);
                out.print(primes[0] + " " + primes[1]);
            }else{
               if(isPrime(n - 2)){
                   out.println(2);
                   out.print(2 + " " + (n - 2));
               }else{
                   out.println(3);
                   int primes[] = findTwoPrimes(n - 3);
                   out.print(3 + " " + primes[0] + " " + primes[1]);
               }
            }
        }
        out.close();
    }

    public static int[] findTwoPrimes(int n){
        for(int i = 3; i <= n / 2; i += 2)
            if(isPrime(i)  && isPrime(n - i))
                return new int[]{i, n - i};
        return new int[]{};
    }

    public static boolean isPrime(int n){
        for(int i = 2; i * i <= n; i++)
            if(n % i == 0) return false;

        return true;
    }
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {
	static int n;
	static HashSet<Integer> h;

	public static boolean isPrime(int n) {
		if (h.contains(n))
			return true;
		if (n == 3 || n == 2)
			return true;
		if (n % 3 == 0 || n % 2 == 0 || n == 1)
			return false;
		int root = (int) Math.ceil(Math.sqrt(n));
		for (int i = 5, j = 7; i <= root || j <= root; i += 6, j += 6)
			if (n % i == 0 || n % j == 0)
				return false;
		h.add(n);
		return true;
	}

	public static void main(String[] args) throws IOException {
		FastPrinter out = new FastPrinter(System.out);
		InputReader in = new InputReader(System.in);
		n = in.nextInt();
		h = new HashSet<Integer>();
		if (isPrime(n)) {
			out.println("1\n" + n);
		} else {
			n -= 3;
			for (int i = 2; i <= n / 2; i++){
				if (isPrime(i) && isPrime(n - i)) {
					out.println("3\n" + 3 + " " + i + " " + (n - i));
					break;
				}
			}
		}
		out.close();
	}
}

class InputReader {
	public BufferedReader reader;
	public StringTokenizer tokenizer;

	public InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream), 32768);
		tokenizer = null;
	}

	public String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public String nextLine() {
		try {
			return reader.readLine();
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
	}

	public int[] readIntArray(int n) {
		int[] ret = new int[n];
		for (int i = 0; i < n; i++)
			ret[i] = nextInt();
		return ret;
	}

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

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

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

	public BigInteger nextBigInt() {
		return new BigInteger(next());
	}

}

class FastPrinter extends PrintWriter {

	public FastPrinter(OutputStream out) {
		super(out);
	}

	public FastPrinter(Writer out) {
		super(out);
	}

}

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class MainD {
	MyScanner sc = new MyScanner();
	Scanner sc2 = new Scanner(System.in);
	long start = System.currentTimeMillis();
	long fin = System.currentTimeMillis();
	final int MOD = 1000000007;
	int[] dx = { 1, 0, 0, -1 };
	int[] dy = { 0, 1, -1, 0 };

	void run() {
		int N = sc.nextInt();
		if (isPrime(N)) {
			System.out.println(1);
			System.out.println(N);
		} else {
			for (int q = N - 1; q >= 2; q--) {
				if (isPrime(q)) {
					// N-qは偶数(N,qが奇数より)のためゴールドバッハの予想が成り立つ
					// (4以上の偶数は２つの素数の和で表すことができる)
					int even = N - q;
					if (even == 2) {
						System.out.println(2);
						System.out.println(2 + " " + q);
					} else {
						boolean[] isPrime = new boolean[300 + 1];
						Arrays.fill(isPrime, true);
						isPrime[0] = isPrime[1] = false;
						for (int i = 2; i * i <= 300; i++) {
							if (!isPrime[i])
								continue;
							for (int j = i * 2; j <= 300; j += i)
								isPrime[j] = false;
						}
						for (int i = 2; i <= even; i++) {
							if (isPrime[i] && isPrime[even - i]) {
								System.out.println(3);
								System.out.println(i + " " + (even - i) + " " + q);
								return;
							}
						}
					}
					return;
				}
			}
		}
	}

	boolean isPrime(int N) {
		if (N <= 1)
			return false;
		for (int i = 2; i * i <= N; i++) {
			if (N % i == 0)
				return false;
		}
		return true;
	}

	public static void main(String[] args) {
		new MainD().run();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	void debug2(int[][] array) {
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				System.out.print(array[i][j]);
			}
			System.out.println();
		}
	}

	boolean inner(int h, int w, int limH, int limW) {
		return 0 <= h && h < limH && 0 <= w && w < limW;
	}

	void swap(int[] x, int a, int b) {
		int tmp = x[a];
		x[a] = x[b];
		x[b] = tmp;
	}

	// find minimum i (a[i] >= border)
	int lower_bound(int a[], int border) {
		int l = -1;
		int r = a.length;
		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (border <= a[mid]) {
				r = mid;
			} else {
				l = mid;
			}
		}
		// r = l + 1
		return r;
	}

	boolean palindrome(String s) {
		for (int i = 0; i < s.length() / 2; i++) {
			if (s.charAt(i) != s.charAt(s.length() - 1 - i)) {
				return false;
			}
		}
		return true;
	}

	class MyScanner {
		int nextInt() {
			try {
				int c = System.in.read();
				while (c != '-' && (c < '0' || '9' < c))
					c = System.in.read();
				if (c == '-')
					return -nextInt();
				int res = 0;
				do {
					res *= 10;
					res += c - '0';
					c = System.in.read();
				} while ('0' <= c && c <= '9');
				return res;
			} catch (Exception e) {
				return -1;
			}
		}

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

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

		String next() {
			try {
				StringBuilder res = new StringBuilder("");
				int c = System.in.read();
				while (Character.isWhitespace(c))
					c = System.in.read();
				do {
					res.append((char) c);
				} while (!Character.isWhitespace(c = System.in.read()));
				return res.toString();
			} catch (Exception e) {
				return null;
			}
		}

		int[] nextIntArray(int n) {
			int[] in = new int[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextInt();
			}
			return in;
		}

		int[][] nextInt2dArray(int n, int m) {
			int[][] in = new int[n][m];
			for (int i = 0; i < n; i++) {
				in[i] = nextIntArray(m);
			}
			return in;
		}

		double[] nextDoubleArray(int n) {
			double[] in = new double[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextDouble();
			}
			return in;
		}

		long[] nextLongArray(int n) {
			long[] in = new long[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextLong();
			}
			return in;
		}

		char[][] nextCharField(int n, int m) {
			char[][] in = new char[n][m];
			for (int i = 0; i < n; i++) {
				String s = sc.next();
				for (int j = 0; j < m; j++) {
					in[i][j] = s.charAt(j);
				}
			}
			return in;
		}
	}
}

import java.util.Scanner;

public class Team4_Dima {

	public static int primes[] = new int[3402]; //3402 totals to 1000000000

	public static boolean isPrime (int n) {
		if (n <= 1) return false;
		if (n == 2) return true;
	    if (n%2 == 0) return false;
		int m = (int) Math.sqrt(n);
		for (int i = 3; i <= m; i += 2){
	        if (n % i == 0)
				return false;
	    }
	    return true;
	}

	public static void setup(){
		primes[0] = 2;
		primes[1] = 3;
		boolean breaker;
		int j;
		for(int i=5; i<Math.sqrt(1000000000); i+=2){
			breaker=false;
			j=0;
			while(primes[j]!=0 && !breaker){
				if(i%primes[j]==0){
					breaker=true;
				}
				j++;
			}
			if(!breaker){
				primes[j]=i;
			}
		}
	}

	public static void main(String args[]){

		setup();

		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		scanner.close();

		if(n==3){
			System.out.println("1");
			System.out.println("3");
			return;
		}
		else if(n==5){
			System.out.println("1");
			System.out.println("5");
			return;
		}

		n -= 3;

		for(int i=0; primes[i]<n; i++){
			if(isPrime(n-primes[i])){
				System.out.println(3);
				System.out.println("3 "+primes[i]+" "+(n-primes[i]));
				return;
			}
		}

	}
}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.lang.*;

public class P584D {
    //static long m=1000000007;
    static BigInteger ways(int N,  int K) {
        BigInteger ret = BigInteger.ONE;
        for(int i=N;i>=N-K+1;i--)
        {
             ret = ret.multiply(BigInteger.valueOf(i));

        }
        for (int j = 1; j<=K; j++) {
            ret = ret.divide(BigInteger.valueOf(j));
        }

            ret=ret.mod(BigInteger.valueOf(1000000007));

        return ret;
    }
    public static int prime(int n)
    {
        int f=1;
        if(n==1)
            return 0;
        for(int i=2;i<=(Math.sqrt(n));)
        {
            if(n%i==0)
            {
                f=0;
                return 0;
            }
            if(i==2)
                i++;
            else
                i+=2;
        }
        if(f==1)
            return 1;
        else
            return 0;
    }
public static long gcd(long x,long y)
{
    if(x%y==0)
        return y;
    else return gcd(y,x%y);
}
    public static BigInteger fact(int n)
    {
        BigInteger f=BigInteger.ONE;
        for(int i=1;i<=n;i++)
        {
            f=f.multiply(BigInteger.valueOf(i));
        }
        //f=f.mod(BigInteger.valueOf(m));
        return f;
    }
public static int gcd(int x,int y)
{
    if(x%y==0)
        return y;
    else return gcd(y,x%y);
}
public static int max(int a,int b)
{
    if(a>b)
        return a;
    else
        return b;
}
public static int min(int a,int b)
{
    if(a>b)
        return b;
    else
        return a;
}
public static long max(long a,long b)
{
    if(a>b)
        return a;
    else
        return b;
}
public static long min(long a,long b)
{
    if(a>b)
        return b;
    else
        return a;
}
public static long pow(long n,long p,long m)
{
     long  result = 1;
      if(p==0)
        return 1;
    if (p==1)
        return n;
    while(p!=0)
    {
        if(p%2==1)
            result *= n;
        result%=m;
        p >>=1;
        n*=n;
        n%=m;
    }
    return result;
}
static long ncr(long n,long k)
{
    long w=1;
    for(long i=n,j=1;i>=n-k+1;i--,j++)
    {
        w=w*i;
        w=w/j;
        w%=1000000007;

    }
    return w;
}
static class Pair implements Comparable<Pair>
{
    int a,b;
    Pair (int a,int b)
    {
        this.a=a;
        this.b=b;
    }

    public int compareTo(Pair o) {
        // TODO Auto-generated method stub
        if(this.a!=o.a)
        return Integer.compare(this.a,o.a);
        else
            return Integer.compare(this.b, o.b);
        //return 0;
    }
}

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

        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder("");
         //InputReader in = new InputReader(System.in);
        // OutputWriter out = new OutputWriter(System.out);
        //PrintWriter pw=new PrintWriter(System.out);
        //String line=br.readLine().trim();
        //int t=Integer.parseInt(br.readLine());
    //  while(t-->0)
        //{
        //int n=Integer.parseInt(br.readLine());
        //long n=Long.parseLong(br.readLine());
        //line=br.readLine().trim();
        //String l[]=br.readLine().split(" ");
        //int m=Integer.parseInt(l[0]);
        //int k=Integer.parseInt(l[1]);
        //l=br.readLine().split(" ");
        //long m=Long.parseLong(l[0]);
        //long n=Long.parseLong(l[1]);
        //char ch=a.charAt();
    //  char c[]=new char[n];
        //String l[]=br.readLine().split(" ");
        //l=br.readLine().split(" ");
        /*int a[]=new int[n];
        for(int i=0;i<n;i++)
        {
            a[i]=Integer.parseInt(l[i]);
        }*/
        /*long a[]=new long[n];
        for(int i=0;i<n;i++)
        {
            a[i]=Long.parseLong(l[i]);
        }*/
        /*int a[][]=new int[n][n];
        for(int i=0;i<n;i++)
        {
        l=br.readLine().split(" ");
            for(int j=0;j<n;j++)
            {
                a[i][j]=Long.parseLong(l[j]);
            }
        }*/

        //  String a=br.readLine();

        // char a[]=c.toCharArray();
        //char ch=l[0].charAt(0);

          // int f1[]=new int[26];
           //int f2[]=new int[26];
        /*for(int i=0;i<n;i++)
        {
        int x=a.charAt(0);
            f1[x-97]++;
        }*/
        /*for(int i=0;i<n;i++)
        {

        }*/
        /*for(int i=0;i<n;i++)
        {
            for(int j=0;j<n;j++)
            {

            }
        }*/
        /*while(q-->0)
          {
                l=br.readLine().split(" ");
                int n=Integer.parseInt(l[0]);
                int k=Integer.parseInt(l[1]);
          }
         */
        /*if(f==1)
            System.out.println("Yes");
        else
            System.out.println("No");*/
        //System.out.print("");
        //sb.append("");
        //sb.append("").append("\n");

        int n=Integer.parseInt(br.readLine());
        int x=prime(n);
        int y=prime(n-2);
        if(x==1)
           {
            System.out.println(1);
            System.out.println(n);
           }
        else if(y==1)
        {
            System.out.println(2);
            System.out.println((n-2)+" 2");
        }
        else
        {
            for(int i=5;i<=n;i+=2)
            {
                int a=prime(i);
                int b=prime(n-i-3);
                if(a==1&&b==1)
                {
                    System.out.println("3");
                    System.out.println("3 "+i+" "+(n-i-3));
                    break;
                }
            }
        }
        //}
    }
   static  class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream)
        {
            this.stream = stream;
        }

        public int read()
        {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars)
            {
                curChar = 0;
                try
                {
                    numChars = stream.read(buf);
                } catch (IOException e)
                {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public double readDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, readInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next()
        {
            return readString();
        }

        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }

     static class OutputWriter
    {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream)
        {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer)
        {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects)
        {
            for (int i = 0; i < objects.length; i++)
            {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects)
        {
            print(objects);
            writer.println();
        }

        public void close()
        {
            writer.close();
        }

        public void flush()
        {
            writer.flush();
        }

    }
    /* USAGE

    //initialize
        InputReader in      = new InputReader(System.in);
        OutputWriter out    =   new OutputWriter(System.out);

    //read int
    int i = in.readInt();
    //read string
    String s = in.readString();
    //read int array of size N
    int[] x = IOUtils.readIntArray(in,N);
    //printline
    out.printLine("X");

    //flush output
    out.flush();

    //remember to close the
    //outputstream, at the end
    out.close();

    */
  static   class IOUtils {

        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = in.readInt();
            return array;
    }
    }
}

import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.io.*;
import java.math.*;
public class Main12{
	static public void main(String args[])throws IOException{
		int tt=1;
		StringBuilder sb=new StringBuilder();
		for(int ttt=1;ttt<=tt;ttt++){
			FastReader s=new FastReader();
			int n=s.nextInt();
			int tmp=0;
			for(int i=2;i<=Math.sqrt(n);i++){
				if(n%i==0){
					tmp++;
				}
			}
			if(tmp==0){
				sb.append("1\n");
				sb.append(n+"\n");
			}else{
				sb.append("3\n");
				tmp=2;
				for(int i=3;i<=n;i++){
					int num=i;
					int num1=n-2*i;
					int tmp1=checkFactors(num)+checkFactors(num1);
					if(tmp1==0){
						tmp=i;
						break;
					}
				}
				sb.append(tmp+" "+tmp+" "+(n-2*tmp)+"\n");
			}
		}
		System.out.print(sb.toString());
	}
	static int checkFactors(int n){
		int tmp=0;
		for(int i=2;i<=Math.sqrt(n);i++){
			if(n%i==0){
				tmp++;
			}
		}
		return tmp;
	}
	//static InputReader in=new InputReader(System.in);
	//static OutputWriter out=new OutputWriter(System.out);
	static ArrayList<ArrayList<Integer>> graph;
	static int mod=1000000007;
	static class Pair{
		int x;
		int y;
		Pair(int x,int y){
			this.x=x;
			this.y=y;
		}
		@Override
            public int hashCode()
            {
                final int temp = 14;
                int ans = 1;
                ans =x*31+y*13;
                return ans;
            }
       @Override
        public boolean equals(Object o)
        {
            if (this == o) {
                return true;
            }
            if (o == null) {
                return false;
            }
            if (this.getClass() != o.getClass()) {
                return false;
            }
            Pair other = (Pair)o;
            if (this.x != other.x || this.y!=other.y) {
                return false;
            }
            return true;
        }
	}
	public static int[] sort(int[] a){
		int n=a.length;
		ArrayList<Integer> ar=new ArrayList<>();
		for(int i=0;i<a.length;i++){
			ar.add(a[i]);
		}
		Collections.sort(ar);
		for(int i=0;i<n;i++){
			a[i]=ar.get(i);
		}
		return a;
	}
	public static long pow(long a, long b){
        long result=1L;
        while(b>0){
            if (b % 2 != 0){
                result=(result*a)%mod;
                b--;
            }
            a=(a*a)%mod;
            b /= 2;
        }
        return result;
    }
	public static long gcd(long a, long b){
        if (a == 0){
            return b;
		}
        return gcd(b%a, a);
    }
	public static long lcm(long a, long b){
		return a*(b/gcd(a,b));
	}
	/*public static long l(){
		String s=in.String();
		return Long.parseLong(s);
	}
	public static void pln(String value){
		System.out.println(value);
	}
	public static int i(){
		return in.Int();
	}
	public static String s(){
		return in.String();
	}*/
}
class FastReader
{
		BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
/*class InputReader
{
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;
	public InputReader(InputStream stream) {
		this.stream = stream;
	}
	public int read() {
		if (numChars== -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}
	public int Int() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
	public String String() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}
	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}
	public String next() {
		return String();
	}
	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}
class OutputWriter {
	private final PrintWriter writer;
	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}
	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}
	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}
	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}
	public void close() {
		writer.close();
	}
	public void flush() {
		writer.flush();
	}
 }
class IOUtils {
	public static int[] readIntArray(InputReader in, int size) {
		int[] array = new int[size];
		for (int i = 0; i < size; i++)
			array[i] = in.Int();
		return array;
	}
} */

import java.util.Scanner;

public class primes {
	public static void main(String[] args){
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		if(prime(n)){
			System.out.println(1);
			System.out.println(n);

		}
		else if(prime(n-2)){
			System.out.println(2);
			System.out.println((n-2)+" "+2);
		}
		else{
			int P=primes(n);
			int m=n-P;
			int a[]=prims(m/2+1);
			int s=a.length;

			for(int i=0;i<s;i++){

					if(prime(m-a[i])){
						System.out.println(3);
						System.out.println(a[i]+" "+(m-a[i])+" "+(n-m));
						i=s;
					}

			}
		}

	}
	public static boolean prime(int p){
		if(p==2)return true;
		else{
		for(int i=2;i<Math.sqrt(p)+1;i++){
			if(p%i==0)return false;
		}
		if(p<2)return false;
		return true;
		}
	}
	public static int primes(int n){

		for(int i=n-1;i>0;i--){
			if(prime(i))return i;
		}
		return 2;
	}
	public static int[] prims(int n){
		int[] a=new int[n];
		int j=0;
		for(int i=2;i<n;i++){
			if(prime(i)){a[j]=i;j++;}
		}
		int[] b=new int[j];
		System.arraycopy(a, 0, b, 0, j);
		return b;
	}
}

import java.io.File;
import java.io.FileNotFoundException;
import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n = sc.nextInt();
		if(isPrime(n)) {
			System.out.printf("1 \n%d" , n);
		} else {
			System.out.printf("3 \n3 ");
			n -= 3;
			for(int i = 2 ; i <= n ; i++) {
				if(isPrime(i) && isPrime(n-i)) {
					System.out.printf("%d %d" , i , n - i);
					break ;
				}
			}
		}

	}

	public static boolean isPrime(int n) {
		for(int i = 2 ; i * i <= n ; i++) {
			if(n%i == 0) {
				return false;
			}
		}
		return true;
	}

}

//package codeforces;

import java.util.Scanner;

/**
 * Created by nitin.s on 02/04/16.
 */
public class DimaAndLisa {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        class Utils {
            boolean isPrime(int x) {
                for(int i = 2; i * i <= x; ++i) {
                    if(x % i == 0) {
                        return false;
                    }
                }
                return true;
            }
        }
        Utils utils = new Utils();
        if(utils.isPrime(n)) {
            System.out.println("1\n" + n);
            return;
        }
        System.out.print("3\n3 ");
        n -= 3;
        for(int i = 3; i < n; ++i) {
            if(utils.isPrime(i) && utils.isPrime(n - i)) {
                System.out.println(i + " " + (n - i));
                return;
            }
        }
    }
}

import java.io.*;
import java.util.*;
public class Solution {
	static Scanner sc=new Scanner(System.in);
	static PrintWriter out=new PrintWriter(System.out);
	//Main Method
	static boolean isPrime(long x) {
		for(long i=2;i*i<=x;i++) if(x%i==0) return false;
		return true;
	}
	static int N=1000000,sieve[]=new int[N+1];
	public static void main(String args[]) {
		sieve[0]=1;
		sieve[1]=1;
		for(int i=2;i*i<=N;i++) {
			if(sieve[i]==0) {
				for(int j=i*i;j<=N;j+=i) sieve[j]=1;
			}
		}
		int test=1;
		while(test-->0) {
			long n=sc.nextLong();
			if(n<=5) {
				out.println(1);
				out.println(n);
				continue;
			}
			long val=3;
			for(long i=n-4;;i-=2) {
				if(isPrime(i)) {
					val=i;
					break;
				}
			}
			n-=val;
			long x=val,y=-1,z=-1;
			for(int i=2;i<=n;i++) {
				if(sieve[i]==0 && sieve[(int)(n-i)]==0) {
					y=i;
					z=n-i;
				}
			}
			out.println(3);
			out.println(x+" "+y+" "+z);
		}
		out.flush();
		out.close();
	}
}

import java.io.*;
import java.util.*;
import java.math.*;
public class div324D
{
	BufferedReader in;
	PrintWriter ob;
	StringTokenizer st;
	public static void main(String[] args) throws IOException {
		new div324D().run();
	}
	void run() throws IOException {
		in=new BufferedReader(new InputStreamReader(System.in));
		ob=new PrintWriter(System.out);
		solve();
		ob.flush();
	}
	void solve() throws IOException {
		// testing Java isProbablePrimeFunction
		int n=ni();
		if(isPrime(n))
			ob.print("1\n"+n);
		else {
			int j=n;
			while(!isPrime(--j)){}
				int diff=n-j,i,f=0;
				for(i=diff;i>=2;i--)
					{
						if(isPrime(i) && (i==diff || i+i==diff))
							{f=1;break;}
						else if(isPrime(i) && ( (diff-i)!=1 && isPrime(diff-i)))
							{f=2;break;}
					}
				if(f==1)
				{
					if(i==diff)
					ob.print("2\n"+j+" "+i);
					else
					ob.print("3\n"+j+" "+i+" "+i);
				}
				else {
					ob.print("3\n"+j+" "+i+" "+(diff-i));
				}
		}
	}
	boolean isPrime(int n) {
		/*for(int i=2;i*i<=n;i++) {
			if(n%i==0)
				return false;
		}
		return true;*/
		BigInteger temp=new BigInteger(""+n);
		return temp.isProbablePrime(200000);
	}
	int ni() throws IOException {
		return Integer.parseInt(nextToken());
	}
	String nextToken() throws IOException {
		if(st==null || !st.hasMoreTokens())
			st=new StringTokenizer(in.readLine());
		return st.nextToken();
	}
}

import java.io.IOException;
import java.util.InputMismatchException;

public class DimaAndLisa {
    public static void main(String[] args) {
        FasterScanner sc = new FasterScanner();

        int N = sc.nextInt();

        if (isPrime(N)) {
        	System.out.println(1);
        	System.out.println(N);
        	return;
        }
        if (isPrime(N - 2)) {
        	System.out.println(2);
        	System.out.format("%d 2\n", N - 2);
        	return;
        }
        for (int i = 4; ; i += 2) {
        	if (isPrime(N - i)) {
        		for (int j = 2; ; j++) {
        			if (isPrime(j) && isPrime(i - j)) {
        				System.out.println(3);
        				System.out.format("%d %d %d\n", N - i, j, i - j);
        				return;
        			}
        		}
        	}
        }
    }

    public static boolean isPrime(int n) {
    	if (n < 2) return false;
    	if (n == 2) return true;
    	for (int i = 2; i <= Math.sqrt(n); i++) {
    		if (n % i == 0) {
    			return false;
    		}
    	}
    	return true;
    }

	public static class FasterScanner {
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = System.in.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public String nextString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

	    public int[] nextIntArray(int n) {
	        int[] arr = new int[n];
	        for (int i = 0; i < n; i++) {
	            arr[i] = nextInt();
	        }
	        return arr;
	    }

		public long[] nextLongArray(int n) {
		    long[] arr = new long[n];
		    for (int i = 0; i < n; i++) {
		        arr[i] = nextLong();
		    }
		    return arr;
		}

	    private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}
}

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static InputStream is = System.in;
    public static BufferedReader br = new BufferedReader(new InputStreamReader(is));
    public static StringTokenizer stok;

    public static String next() {
        String nxt;
        try {
            if (stok != null && stok.hasMoreElements()) return stok.nextToken();
            if ((nxt = br.readLine()) != null) {
                stok = new StringTokenizer(nxt);
                if (stok.hasMoreElements()) return stok.nextToken();
            } else return null;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public static Integer nextInt() {
        return Integer.valueOf(next());
    }

    public static boolean isPrime(int k) {
        for (int i = 2; i * i <= k; i++) {
            if (k % i == 0) return false;
        }
        return true;
    }

    public static void main(String[] args) {
        int n = nextInt();
        if (isPrime(n)) {
            System.out.println(1 + " \n" + n);
            return;
        }
        int p = n - 1;
        for (int i = n; i > 1; i--) {
            if (isPrime(i)) {
                p = i;
                break;
            }
        }
        int t = n - p;
        if (isPrime(t)) {
            System.out.println(2 + " \n" + t + " " + p);
            return;
        }
        for (int i = 2; i < t; i++) {
            for (int j = 2; j < t; j++) {
                if (isPrime(i) && isPrime(j) && i + j + p == n) {
                    System.out.println(3 + " \n" + i + " " + j + " " + p);
                    return;
                }
            }
        }
    }
}

import java.math.*;
import java.util.*;

public class Lisa
{
    public static void main(String []av) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        boolean isPrime = BigInteger.valueOf(n).isProbablePrime(10);
        if (isPrime) {
            System.out.println(1);
            System.out.println(n);
        } else {
            int [] primes = generatePrimes(10000);
            for (int p : primes) {
                int np = n - 3 - p;
                boolean good = BigInteger.valueOf(np).isProbablePrime(12);
                if (good) {
                    System.out.println(3);
                    System.out.println(3 + " " + p + " " + np);
                    return;
                }
            }
            // http://www.primepuzzles.net/puzzles/puzz_558.htm
            throw new Error("don't trust the internet");
        }
    }

    /* returns boolean array a[] such that a[p] == true iff p is prime. */
    static boolean [] sieve(int N) {
        boolean [] a = new boolean[N+1];
        Arrays.fill(a, true);
        a[0] = a[1] = false;
        for (int p = 2; p * p <= N; p++)
            if (a[p]) {
                // Iterate through all multiples m of the prime and mark
                // them as not prime.
                for (int m = p * p; m <= N; m += p)
                    a[m] = false;
            }
        return a;
    }

    /* generate all prime numbers from 2..N, inclusive */
    static int [] generatePrimes(int N) {
        List<Integer> primes = new ArrayList<Integer>();
        boolean [] isPrime = sieve(N);
        for (int i = 0; i <= N; i++)
            if (isPrime[i])
                primes.add(i);
        int [] pa = new int[primes.size()];
        for (int i = 0; i < pa.length; i++)
            pa[i] = primes.get(i);
        return pa;
    }
}

import java.io.*;
import java.util.*;
import java.math.*;

public class p584d {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        long n = in.nextLong();
        if (Miller_Rabin(n, 5)) {
            out.println("1");
            out.println(n);
        } else if (Miller_Rabin(n - 2, 5)) {
            out.println("2");
            out.println("2" + " " + (n - 2));
        } else {
            if (Miller_Rabin(n - 4, 5)) {
                out.println("3");
                out.println("2" + " " + "2" + " " + (n - 4));
                out.close();
                return;
            }
            n -= 3;
            for (long i = 3; i < n / 2; i++) {
                if (Miller_Rabin(i, 5) && Miller_Rabin(n - i, 5)) {
                    out.println("3");
                    out.println("3" + " " + i + " " + (n - i));
                    out.close();
                    return;
                }
            }
        }
        out.close();
    }

    public static boolean Miller_Rabin(long n, int iteration) {
        if (n == 0 || n == 1) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        if (n % 2 == 0) {
            return false;
        }
        long s = n - 1;
        while (s % 2 == 0) {
            s /= 2;
        }
        Random rand = new Random();
        for (int i = 1; i <= iteration; i++) {
            long r = Math.abs(rand.nextLong());
            long a = r % (n - 1) + 1;
            long temp = s;
            long mod = modpow(a, temp, n);
            while (temp != n - 1 && mod != 1 && mod != n - 1) {
                mod = mulmod(mod, mod, n);
                temp *= 2L;
            }
            if (mod != n - 1 && temp % 2 == 0) {
                return false;
            }
        }
        return true;
    }

    public static long modpow(long a, long p, long n) {
        long r = a % n;
        if (p == 0) {
            return 1;
        }
        if (p == 1) {
            return r;
        }
        if (p % 2 == 1) {
            r = modpow(a, p / 2, n) % n;
            r = r * r % n;
            return r * a % n;
        } else {
            r = modpow(a, p / 2, n) % n;
            r = r * r % n;
            return r;
        }
    }

    public static long mulmod(long a, long b, long mod) {
        return BigInteger.valueOf(a).multiply(BigInteger.valueOf(b)).mod(BigInteger.valueOf(mod)).longValue();
    }

    static class Pair implements Comparable<Pair> {
        int x;
        int y;

        public Pair(int x, int y) {
            super();
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Pair p) {
            return x < p.x ? -1 : x > p.x ? 1 : 0;
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

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

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

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return null;
        }

        public boolean hasMoreElements() {
            while (tokenizer == null || !tokenizer.hasMoreElements()) {
                String s;
                try {
                    s = reader.readLine();
                } catch (IOException e) {
                    return false;
                }
                tokenizer = new StringTokenizer(s);
            }
            return tokenizer.hasMoreElements();
        }
    }
}

//package codeforces.FiveEightFour;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class TestD {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new TestD().solve();
	}

	public void solve() {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));

		String s;
		try {
			while ((s = reader.readLine()) != null) {
				int n = Integer.valueOf(s).intValue();
				int a = priPrime(n);
				int remain = n - a;
				int b = 0;
				int c = 0;
				boolean flag = true;
				if(a == n) {
					System.out.println("1");
					System.out.println(a);
					continue;
				}
				for (; flag == true; a = priPrime(a)) {
					remain = n - a;
					for (b = 2; flag == true; b++) {
						c = n - a - b;
						if (isPrime(b) && isPrime(c)) {
							if (c == 0) {
								System.out.println("2");
								System.out.println(a + " " + b);
							} else {
								System.out.println("3");
								System.out.println(a + " " + b + " " + c);
							}
							flag = false;
						}
					}
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static int priPrime(int n) {
		while (!isPrime(n)) {
			n--;
		}
		return n;
	}

	public static boolean isPrime(int n) {
		int flag = (int) Math.sqrt(n);
		for (int i = 2; i <= flag; i++) {
			if (n % i == 0)
				return false;
		}
		return true;
	}

}

import java.io.*;
import java.util.*;

public class D {

    static int[] primes;

    static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) throws Exception {
        primes = calculatePrimeNumbers(1_000_000);

        InputReader in = new InputReader();
        int N = in.nextInt();

        if (Arrays.binarySearch(primes, N) >= 0)
            printSolution(1, N);

        int prime1 = N - 1;
        while (true) {
            if (checkPrime(prime1))
                break;
            prime1--;
        }

        int needNow = N - prime1;
        if (checkPrime(needNow))
            printSolution(2, prime1, needNow);

        int indxCeil = ceilIndex(primes, needNow);

        for (int i = 0; i < indxCeil; i++)
            if (Arrays.binarySearch(primes, needNow - primes[i]) >= 0)
                printSolution(3, prime1, primes[i], needNow - primes[i]);

        throw new IllegalStateException("No solution");
    }

    private static void printSolution(int num, int... nums) {
        out.println(num);
        out.print(nums[0]);
        if (num > 1) {
            out.write(' ');
            out.print(nums[1]);

            if (num > 2) {
                out.write(' ');
                out.print(nums[2]);
            }
        }
        out.write('\n');
        out.close();
        System.exit(0);
    }

    private static boolean checkPrime(int x) {
        if (x < primes[primes.length - 1])
            return Arrays.binarySearch(primes, x) >= 0;

        for (int i = 0; primes[i] * primes[i] <= x; i++) {
            if (x % primes[i] == 0)
                return false;
        }

        return true;
    }

    private static int ceilIndex(int A[], int key) {
        int l = -1;
        int r = A.length - 1;
        int m;

        while (r - l > 1) {
            m = l + (r - l) / 2;
            if (A[m] > key)
                r = m;
            else if (A[m] < key)
                l = m;
            else {
                while (A[m + 1] == key)
                    m++;
                return m + 1;
            }
        }

        return r;
    }

    private static int[] calculatePrimeNumbers(int upTo) {
        boolean[] primes = new boolean[upTo + 1];

        for (int i = 3; i < primes.length; i += 2) {
            primes[i] = true;
        }

        for (int i = 3; i * i < primes.length; i += 2) {
            if (primes[i]) {
                int idx = i * i;
                while (idx < primes.length) {
                    primes[idx] = false;
                    idx += i;
                }
            }
        }
        int primeCount = 1; // 2
        for (int i = 3; i < primes.length; i += 2) {
            if (primes[i])
                primeCount++;
        }

        int[] primeNumbers = new int[primeCount];

        primeNumbers[0] = 2;
        int idx = 1;

        for (int i = 3; i < primes.length; i += 2) {
            if (primes[i])
                primeNumbers[idx++] = i;
        }

        return primeNumbers;
    }

}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[2048];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader() {
        this.stream = System.in;
    }

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public InputReader(SpaceCharFilter filter) {
        this.stream = System.in;
        this.filter = filter;
    }

    public InputReader(InputStream stream, SpaceCharFilter filter) {
        this.stream = stream;
        this.filter = filter;
    }

    public int read() {
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public char nextChar() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        return (char) c;
    }

    public int nextDigit() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        return c - '0';
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        boolean negative = false;
        if (c == '-') {
            negative = true;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return negative ? -res : res;
    }

    public int nextUnsignedInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res;
    }

    public final long nextLong() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        boolean negative = false;
        if (c == '-') {
            negative = true;
            c = read();
        }
        long res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return negative ? -res : res;
    }

    public final long nextUnsignedLong() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        long res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res;
    }

    public double nextDouble() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        long sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!(c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1 || c == '.'));

        if (c != '.') {
            return res * sgn;
        }
        c = read();

        long aft = 0;
        int len = 1;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            aft *= 10;
            len *= 10;
            aft += c - '0';
            c = read();
        } while (!isSpaceChar(c));

        return res * sgn + aft / (1.0 * len);
    }

    public String nextLine() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndChar(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public boolean isEndChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public String next() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public char[] nextChars() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));

        char[] chars = new char[res.length()];
        res.getChars(0, chars.length, chars, 0);
        return chars;
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
        int n =in.nextInt();
        if (isPrime(n))
        {
            out.printLine(1);
            out.printLine(n);
        }
        else
        {
            if (isPrime(n-2))
            {
                out.printLine(2);
                out.printLine(2+" "+(n-2));
            }
            else
            {
                int ans1=0;

                n-=3;
                for (int i =2;i<n;i++)
                {
                    if (isPrime(i)&&isPrime(n-i))
                    {
                        ans1=i;
                        break;
                    }
                }
                out.printLine(3);
                out.printLine(3+" "+ans1+" "+(n-ans1));
            }
        }

        out.flush();
    }
    static boolean isPrime(int a)
    {
        for (int i =2;i<=Math.sqrt(a);i++)
            if (a%i==0)
                return false;
        return true;
    }

}

class pair  implements Comparable
{

    int key;
    int value;
    public pair(Object key, Object value) {

        this.key = (int)key;
        this.value=(int)value;
    }

    @Override
    public int compareTo(Object o) {
        pair temp =(pair)o;
        return  key-temp.key;
    }
}
class Graph {

    int n;
    ArrayList<Integer>[] adjList;

    public Graph(int n) {
        this.n = n;
        adjList = new ArrayList[n];
        for (int i = 0; i < n; i++)
            adjList[i] = new ArrayList<>();
    }

}

class InputReader {

    private final InputStream stream;
    private final byte[] buf = new byte[8192];
    private int curChar, snumChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (snumChars == -1)
            throw new InputMismatchException();
        if (curChar >= snumChars) {
            curChar = 0;
            try {
                snumChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (snumChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long nextLong() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public int[] nextIntArray(int n) {
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public String nextLine() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    }

}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

    public void flush() {
        writer.flush();
    }

}

import java.util.Scanner;

public class DD {
public static void main(String[] args) {
	 Scanner sc=new  Scanner(System.in);
	 int n=sc.nextInt();
	 boolean []used=new boolean[100001];
	 	for (int i =2; i <=316; i++) {
			if(!used[i]){
				for (int j =2; j <=100000/i; j++) {
					used[i*j]=true;
				}
			}
		}
if(n==4){
System.out.println("2");
	 		System.out.println("2 2");
return;
}
	 	int k=n;
	 	while(true){
	 	while(tubmi(k)){
	 		k--;
	 	}
	 	if(k==n){
	 		System.out.println("1");
	 		System.out.println(k);
	 		return;
	 	}else{
	 		if(!tubmi(n-2)){
	 			System.out.println("2");
	 			System.out.println(n-2+" "+"2");
	 			return;
	 		}else{

	 			int h=n-k;
	 			for (int i =2; i <=h; i++) {
					if(!used[i]&&!used[Math.abs(i-h)]){
						System.out.println("3");
			 			System.out.print(k+" ");
						System.out.print(i+" "+Math.abs(i-h));return;
					}
				}
	 		}
	 	}
	 	}
}

private static boolean tubmi(int k) {
		for (int i =2; i <=Math.sqrt(k); i++) {
			if(k%i==0)return true;
		}
	return false;
}
}

import java.io.*;
import java.util.StringTokenizer;

public class Main {

    static MyScanner in;
    static PrintWriter out;
    //static Timer t = new Timer();

    public static void main(String[] args) throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out, true);

        int n = in.nextInt();
        if (n == 3) {
            out.println("1\n3");
            return;
        }
        if (n == 4) {
            out.println("2\n2 2");
            return;
        }
        if (n == 5) {
            out.println("1\n5");
            return;
        }
        if (n == 6) {
            out.println("2\n3 3");
            return;
        }
        if (n == 7) {
            out.println("1\n7");
            return;
        }

        int s1 = n - 1;

        while(true) {
            s1--;
            while (!isPrime(s1))
                s1--;

            int left = n - s1;
            for (int i = 2; i < left; i++)
                if (isPrime(i) && isPrime(left - i)) {
                    if (i == 1 || (left - i == 1)) break;
                    out.println(3);
                    out.println(s1 + " " + i + " " + (left - i));
                    return;
                }
        }
    }

    static boolean isPrime(int n) {
        int sqrt = (int) Math.sqrt(n) + 1;
        for (int i = 2; i < sqrt; i++)
            if (n % i == 0)
                return false;
        return true;
    }

}

class MyScanner {

    private final BufferedReader br;
    private StringTokenizer st;
    private String last;

    public MyScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    public MyScanner(String path) throws IOException {
        br = new BufferedReader(new FileReader(new File(path)));
        //br = new BufferedReader(new InputStreamReader(new FileInputStream(
        //new File(path)), "cp1251"));
    }

    String next() throws IOException {
        while (st == null || !st.hasMoreElements())
            st = new StringTokenizer(br.readLine());
        last = null;
        return st.nextToken();
    }

    String nextLine() throws IOException {
        st = null;
        return (last == null) ? br.readLine() : last;
    }

    boolean hasNext() {
        if (st != null && st.hasMoreElements())
            return true;

        try {
            while (st == null || !st.hasMoreElements()) {
                last = br.readLine();
                st = new StringTokenizer(last);
            }
        } catch (Exception e) {
            return false;
        }

        return true;
    }

    String[] nextStrings(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = next();
        return arr;
    }

    String[] nextLines(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLine();
        return arr;
    }

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

    int[] nextInts(int n) throws IOException {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    Integer[] nextIntegers(int n) throws IOException {
        Integer[] arr = new Integer[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    int[][] next2Ints(int n, int m) throws IOException {
        int[][] arr = new int[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextInt();
        return arr;
    }

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

    long[] nextLongs(int n) throws IOException {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLong();
        return arr;
    }

    long[][] next2Longs(int n, int m) throws IOException {
        long[][] arr = new long[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextLong();
        return arr;
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next().replace(',', '.'));
    }

    double[] nextDoubles(int size) throws IOException {
        double[] arr = new double[size];
        for (int i = 0; i < size; i++)
            arr[i] = nextDouble();
        return arr;
    }

    boolean nextBool() throws IOException {
        String s = next();
        if (s.equalsIgnoreCase("true") || s.equals("1"))
            return true;

        if (s.equalsIgnoreCase("false") || s.equals("0"))
            return false;

        throw new IOException("Boolean expected, String found!");
    }
}

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n;
        n = sc.nextInt();
        if(isPrime(n)){
            System.out.printf("1\n %d\n",n);
        }else if(isPrime(n-2)){
            System.out.printf("2\n 2 %d", n-2);
        }else{
            boolean fl = false;
            for(int i=3; i<=300 && !fl; i+=2){
                if(isPrime(i)){
                    int k = n-i;
                    if(isPrime(k)){
                        System.out.printf("2\n%d %d\n",i,k);
                        break;
                    }else{
                        for(int l=3; l<=300; l+=2){
                            if(isPrime(l) && isPrime(k-l)){
                                System.out.printf("3\n%d %d %d\n",i,k-l,l);
                                fl = true;
                                break;
                            }
                        }
                    }
                }
            }
        }
    }

    public static boolean isPrime(int n){
        if(n == 1) return false;
        for(int i=3; i*i <= n; i++){
            if(n%i == 0){
                return false;
            }
        }
        if(n != 2 && n%2 == 0) return false;
        return true;
    }
}

import java.util.*;
import java.io.*;

public class Solution{
	static PrintWriter out=new PrintWriter(System.out);
	public static void main (String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

		String[] temp=br.readLine().trim().split(" ");

		int n=Integer.parseInt(temp[0]);
		printNumbers(n);

		out.flush();
		out.close();
	}
	public static void printNumbers(int n)
	{
	    if(isPrime(n)){
	        out.println(1);
	        out.println(n);
	        return;
	    }
	    int remaining=n-3;
	    ArrayList<Integer> ans=new ArrayList<>();
	    ans.add(3);
	    for(int i=2;i<n;i++){
	        if(isPrime(i)){
	            if(remaining-i==0){
	                ans.add(i);
	                break;
	            }
	            else if(isPrime(remaining-i)){
	                ans.add(i);
	                ans.add(remaining-i);
	                break;
	            }
	        }
	    }

	    out.println(ans.size());
	    for(int i=0;i<ans.size();i++){
	        out.print(ans.get(i)+" ");
	    }
	    out.println();
	}
	public static boolean isPrime(int x){
	    for(int i=2;i<=Math.sqrt(x);i++){
	        if(x%i==0){
	            return false;
	        }
	    }
	    return true;
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.BufferedReader;
import java.util.regex.Pattern;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author amalev
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public boolean isPrime(long n) {
            long i = 2;
            while (i * i <= n) {
                if (n % i == 0) {
                    return false;
                }
                if (i == 2) {
                    i++;
                } else {
                    i += 2;
                }
            }
            return true;
        }

        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            boolean[] p1000 = new boolean[1000];
            int[] res1000 = new int[1000];
            for (int i = 2; i < 1000; i++) {
                p1000[i] = isPrime(i);
            }
            p1000[0] = true;
            for (int n = 2; n < 1000; n++) {
                if (n % 2 == 0) {
                    for (int p = n; p > 1; p--) {
                        if (p1000[p] && p1000[n - p]) {
                            res1000[n] = p;
                            break;
                        }
                    }
                    if (res1000[n] == 0) {
                        throw new RuntimeException("Not possible for n " + n);
                    }
                }
            }

            int n = in.nextInt();
            int p = n;
            while (p > 2 && !isPrime(p)) {
                p -= 2;
            }
            if (p < 2) {
                throw new RuntimeException("Not possible for n " + n);
            }
            int a = p;
            int b = res1000[n - p];
            int c = n - p - res1000[n - p];

            int cnt = 1;
            if (b > 0) cnt++;
            if (c > 0) cnt++;

            out.println(cnt);
            out.print(a);
            if (b > 0) {
                out.print(" ");
                out.print(b);
            }
            if (c > 0) {
                out.print(" ");
                out.print(c);
            }

        }

    }

    static class FastScanner {
        final BufferedReader input;
        String[] buffer;
        int pos;
        final static Pattern SEPARATOR = Pattern.compile("\\s+");

        public FastScanner(InputStream inputStream) {
            input = new BufferedReader(new InputStreamReader(inputStream));
        }

        private String read() {
            try {
                if (buffer == null || pos >= buffer.length) {
                    buffer = SEPARATOR.split(input.readLine());
                    pos = 0;
                }
                return buffer[pos++];
            } catch (Exception ex) {
                throw new RuntimeException(ex);
            }
        }

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

    }
}

import java.util.*;
import java.io.*;

public class A {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int n = in.nextInt();
        if (n == 3) {
            out.println("1 3");
            return;
        }
        for (int i = 2; i * i <= n; i++) {
            if (n % i == 0) {
                break;
            }
            if ((i + 1) * (i + 1) > n) {
                out.println(1 + " " + n);
                return;
            }
        }
        for (int i = 2; i * i <= n - 2; i++) {
            if ((n - 2) % i == 0) {
                break;
            }
            if ((i + 1) * (i + 1) > n - 2) {
                out.println(2 + " " + (n - 2) + " " + 2);
                return;
            }
        }
        n -= 3;
        for (int i = 2; i <= n; i++) {
            boolean flag = false;
            for (int j = 2; j * j <= i; j++) {
                if (i % j == 0) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                continue;
            }
            for (int j = 2; j * j <= n - i; j++) {
                if ((n - i) % j == 0) {
                    break;
                }
                if ((j + 1) * (j + 1) > n - i) {
                    out.println(3 + " " + 3 + " " + (n - i) + " " + i);
                    return;
                }
            }
        }
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

    public static void main(String[] arg) {
        new A().run();
    }
}

import java.util.*;
import java.io.*;
import java.math.BigInteger;

public class Main {
	static int[] prines;

	public static void main(String[] args) throws IOException {
		lenbuf = is.read(inbuf);
		int n = ni();
		prines = generatePrimes(Math.min(n, 34000));
		int length = prines.length;
		if (check(prines, n)) {
			System.out.println(1);
			System.out.println(n);
		} else if (check(prines, n - 2)) {
			System.out.println(2);
			System.out.println(n - 2 + " " + 2);
		} else {
			for (int i = 0; i < length; ++i) {
				for (int j = 0; j < length; ++j) {
					int t = n - prines[i] - prines[j];
					if (check(prines, t) && t >= 2) {
						System.out.println(3);
						System.out.println(t + " " + prines[i] + " "
								+ prines[j]);
						return;
					}
				}
			}
		}

	}

	public static boolean check(int[] primes, int n) {
		for (int i = 0; i < prines.length; ++i) {
			if (prines[i] == n) {
				return true;
			}
			if (n % primes[i] == 0) {
				return false;
			}
		}
		return true;
	}

	public static int[] generatePrimes(int n) {
		boolean[] prime = new boolean[n + 1];
		Arrays.fill(prime, 2, n + 1, true);
		for (int i = 2; i * i <= n; i++)
			if (prime[i])
				for (int j = i * i; j <= n; j += i)
					prime[j] = false;
		int[] primes = new int[n + 1];
		int cnt = 0;
		for (int i = 0; i < prime.length; i++)
			if (prime[i])
				primes[cnt++] = i;

		return Arrays.copyOf(primes, cnt);
	}

	static InputStream is = System.in;
	static byte[] inbuf = new byte[1 << 23];
	static int lenbuf = 0, ptrbuf = 0;

	static int readByte() {

		if (ptrbuf >= lenbuf) {
			return -1;
		}

		return inbuf[ptrbuf++];
	}

	static boolean hasNext() {
		int t = skip();

		if (t == -1) {
			return false;
		}
		ptrbuf--;
		return true;
	}

	static boolean isSpaceChar(int c) {
		return !(c >= 33 && c <= 126);
	}

	static int skip() {
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	static double nd() {
		return Double.parseDouble(ns());
	}

	static char nc() {
		return (char) skip();
	}

	static String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b))) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	static char[] ns(int n) {
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	static char[][] nm(int n, int m) {
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	static int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	static long nl() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
}

class Edge implements Comparable<Edge> {
	int t;
	long cost;

	public Edge(int t, long cost) {
		this.t = t;
		this.cost = cost;
	}

	@Override
	public int compareTo(Edge other) {
		return Long.compare(this.cost, other.cost);
	}
}

import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class D implements Runnable{

	Random rnd = new Random();

	void solve() throws IOException {
		int n = readInt();

		if (isPrime(n)) {
			out.println(1);
			out.println(n);
			return;
		}

		if (isPrime(n - 2)) {
			out.println(2);
			out.println(2 + " " + (n - 2));
			return;
		}

		int[] primes = new int[100510];
		primes[0] = 2;

		for (int x = 3, i = 1; i < primes.length; x += 2) {
			if (isPrime(x)) {
				primes[i++] = x;
			}
		}

		for (int prime : primes) {
			if (prime > n) break;
			if (isPrime(n - prime)) {
				out.println(2);
				out.println(prime + " " + (n - prime));
				break;
			} else if (isPrime(n - 2 - prime)) {
				out.println(3);
				out.println(2 + " " + prime + " " + (n - 2 - prime));
				break;
			} else if (isPrime(n - 3 - prime)) {
				out.println(3);
				out.println(3 + " " + prime + " " + (n - 3 - prime));
				break;
			}
		}
	}

	Set<Integer> primeSet;

	private boolean isPrime(int x) {

		if (x == 1) return false;
		if (x == 2) return true;
		if (x % 2 == 0) return false;

		for (int d = 3; d * d <= x; d += 2) {
			if (x % d == 0) return false;
		}

		return true;
	}

	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok = new StringTokenizer("");

	public static void main(String[] args){
		new D().run();
	}

	public void run(){
		try{
			long timeBegin = System.currentTimeMillis();
			Locale.setDefault(Locale.US);

			init();
			solve();

			out.close();

			long timeEnd = System.currentTimeMillis();
			System.err.println("Time = " + (timeEnd - timeBegin));
		}catch (Exception e){
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	String readString() throws IOException{
		while(!tok.hasMoreTokens()){
			try{
				tok = new StringTokenizer(in.readLine());
			}catch (Exception e){
				return null;
			}
		}

		return tok.nextToken();
	}

	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}

	void init() throws FileNotFoundException{
		Locale.setDefault(Locale.US);

		if (ONLINE_JUDGE){
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		}else{
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
	}
}

import java.util.Scanner;

public class primes {
	public static void main(String[] args){
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		if(prime(n)){
			System.out.println(1);
			System.out.println(n);

		}
		else if(prime(n-2)){
			System.out.println(2);
			System.out.println((n-2)+" "+2);
		}
		else{
			int P=primes(n);
			int m=n-P;
			int a[]=prims(m/2+1);
			int s=a.length;

			for(int i=0;i<s;i++){

					if(prime(m-a[i])){
						System.out.println(3);
						System.out.println(a[i]+" "+(m-a[i])+" "+(n-m));
						i=s;
					}

			}
		}

	}
	public static boolean prime(int p){
		if(p==2)return true;
		else{
		for(int i=2;i<Math.sqrt(p)+1;i++){
			if(p%i==0)return false;
		}
		if(p<2)return false;
		return true;
		}
	}
	public static int primes(int n){

		for(int i=n-1;i>0;i--){
			if(prime(i))return i;
		}
		return 2;
	}
	public static int[] prims(int n){
		int[] a=new int[n];
		int j=0;
		for(int i=2;i<n;i++){
			if(prime(i)){a[j]=i;j++;}
		}
		int[] b=new int[j];
		System.arraycopy(a, 0, b, 0, j);
		return b;
	}
}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class Codeforces {

    StringTokenizer tok;
    BufferedReader in;
    PrintWriter out;

    final boolean OJ = System.getProperty("ONLINE_JUDGE") != null;

    String filename = null;

    void init() {
        try {
            if (OJ) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    String readString() {
        try {
            while (tok == null || !tok.hasMoreTokens()) {
                tok = new StringTokenizer(in.readLine());
            }
            return tok.nextToken();
        } catch (Throwable t) {
            throw new RuntimeException(t);
        }
    }

    int readInt() {
        return Integer.parseInt(readString());
    }

    long readLong() {
        return Long.parseLong(readString());
    }

    public static void main(String[] args) {
        new Codeforces().run();
    }

    void run() {
        init();
        long time = System.currentTimeMillis();
        solve();
        //System.err.println(System.currentTimeMillis() - time);
        out.close();
    }

    boolean gold(int x) {
        int size = x + 100;
        boolean[] prime = new boolean[size];
        Arrays.fill(prime, true);
        prime[0] = prime[1] = false;
        for (int i=2;i<size;i++) {
            if (prime[i]) {
                for (int j= i*i;j<size;j+=i) {
                    prime[j] = false;
                }
            }
        }

        for (int i=0;i<size;i++) {
            for (int j=0;j<size;j++) {
                if (prime[i] && prime[j]) {
                    int z = x - i - j;
                    if (z > 0 && prime[z]) {
                        out.println(i + " " + j + " " + z);
                    }
                }
            }
        }
        return false;
    }

    int size = 32000;
    boolean[] prime;
    ArrayList<Integer> primes = new ArrayList<>();

    void initErat() {
        prime = new boolean[size];
        Arrays.fill(prime, true);
        prime[0] = prime[1] = false;
        for (int i=2;i<size;i++) {
            if (prime[i]) {
                primes.add(i);
                if ((long) i * i < size) {
                    for (int j= i * i; j<size;j+=i) {
                        prime[j] = false;
                    }
                }
            }
        }
    }

    boolean isPrime(int x) {
        if (x < size) return prime[x];
        int upto = (int)Math.sqrt(x) + 1;
        for (int p : primes) {
            if (p > upto) break;
            if (x % p == 0) return false;
        }
        return true;
    }

    void sol(int x) {
        if (isPrime(x)) {
            out.println(1);
            out.println(x);
            return;
        }

        for (int p : primes) {
            if (p > x) break;
            if (isPrime(x - p)) {
                out.println(2);
                out.println(p + " " + (x - p));
                return;
            }
        }

        x -= 3;

        for (int p : primes) {
            if (p > x) break;
            if (isPrime(x - p)) {
                out.println(3);
                out.println("3 " + p + " " + (x - p));
                return;
            }
        }
    }

    void solve() {
        initErat();
        int t = 1;
        while (t --> 0) {
            sol(readInt());
        }

    }

}

import java.util.Scanner;

public class DimaAndLisa
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		if(isPrime(n))
		{
			System.out.println(1);
			System.out.println(n);
		}
		else
		{
			System.out.println(3);
			System.out.print(3 + " ");
			n -= 3;

			for (int i = 2; i <= n/2; i+=1)
			{
				if(isPrime(i) && isPrime(n-i))
				{
					System.out.print(i + " ");
					System.out.println(n-i);
					return;
				}
			}
		}
	}

	static boolean isPrime(int n) {
	    if(n < 2) return false;
	    if(n == 2 || n == 3) return true;
	    if(n%2 == 0 || n%3 == 0) return false;
	    int sqrtN = (int)Math.sqrt(n)+1;
	    for(int i = 6; i <= sqrtN; i += 6) {
	        if(n%(i-1) == 0 || n%(i+1) == 0) return false;
	    }
	    return true;
	}
}

import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Created by Timur on 12.12.2016.
 */
public class _584D {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();

        if(isPrime(n)){
            out.println(1);
            out.print(n);
        }else{
            if(n % 2 == 0){
                out.println(2);
                int primes[] = findTwoPrimes(n);
                out.print(primes[0] + " " + primes[1]);
            }else{
               if(isPrime(n - 2)){
                   out.println(2);
                   out.print(2 + " " + (n - 2));
               }else{
                   out.println(3);
                   int primes[] = findTwoPrimes(n - 3);
                   out.print(3 + " " + primes[0] + " " + primes[1]);
               }
            }
        }
        out.close();
    }

    public static int[] findTwoPrimes(int n){
        for(int i = 3; i <= n / 2; i += 2)
            if(isPrime(i)  && isPrime(n - i))
                return new int[]{i, n - i};
        return new int[]{};
    }

    public static boolean isPrime(int n){
        for(int i = 2; i * i <= n; i++)
            if(n % i == 0) return false;

        return true;
    }
}

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static InputStream is = System.in;
    public static BufferedReader br = new BufferedReader(new InputStreamReader(is));
    public static StringTokenizer stok;

    public static String next() {
        String nxt;
        try {
            if (stok != null && stok.hasMoreElements()) return stok.nextToken();
            if ((nxt = br.readLine()) != null) {
                stok = new StringTokenizer(nxt);
                if (stok.hasMoreElements()) return stok.nextToken();
            } else return null;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public static Integer nextInt() {
        return Integer.valueOf(next());
    }

    public static boolean isPrime(int k) {
        for (int i = 2; i * i <= k; i++) {
            if (k % i == 0) return false;
        }
        return true;
    }

    public static void main(String[] args) {
        int n = nextInt();
        if (isPrime(n)) {
            System.out.println(1 + " \n" + n);
            return;
        }
        int p = n - 1;
        for (int i = n; i > 1; i--) {
            if (isPrime(i)) {
                p = i;
                break;
            }
        }
        int t = n - p;
        if (isPrime(t)) {
            System.out.println(2 + " \n" + t + " " + p);
            return;
        }
        for (int i = 2; i < t; i++) {
            for (int j = 2; j < t; j++) {
                if (isPrime(i) && isPrime(j) && i + j + p == n) {
                    System.out.println(3 + " \n" + i + " " + j + " " + p);
                    return;
                }
            }
        }
    }
}

import java.util.*;
public class Main {
    static BitSet bset;
   static int MAX = 10000001;
   public static void sieve() {
      bset = new BitSet(MAX);
      bset.set(2);
      for (int j = 3; j < MAX; j+=2) bset.set(j);
      int sqrt = (int) Math.sqrt(MAX);
      for (int i = 3; i < sqrt; i+=2)
         if (bset.get(i)) {
            for (int j = i*i; j < MAX; j+=2*i) bset.clear(j);
            //list.add(i);
         }
   }
   public static boolean isPrime(long n) { // n>=0
      if (n < MAX) return bset.get((int)n);
      int sqrt = (int) Math.sqrt(n);
      for (int i = 2; i <= sqrt; i = bset.nextSetBit(i+1))
         if (n % i == 0) return false;
      return true;
   }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        StringBuilder out= new StringBuilder();
        sieve();
        int n = in.nextInt();
        if(isPrime(n)){
            out.append("1\n"+n+"\n");
        }
        else{
            int i;
            for (i = n-2; i >= 2; i--) {
                if(isPrime(i)){
                    n -= i;
                    break;
                }
            }
            for (int j = 2; j <= n; j = bset.nextSetBit(j+1)) {
                if(j==n){
                    out.append("2\n"+j+" "+i+"\n");
                    break;
                }
                else if(isPrime(n-j)){
                    out.append("3\n"+j+" "+(n-j)+" "+i+"\n");
                    break;
                }
            }
        }
        System.out.print(out);
    }
}

import java.util.Scanner;

public class Main
{
    private static boolean isPrime(int x)
    {
        double d = Math.sqrt((double) x);
        int s = (int) d;
        for (int i = 2; i <= s; i++)
        {
            if (x % i == 0)
            {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        int n = Integer.parseInt(s1);
        int a = 0, b = 0;
        int k = 0;
        int res = 0;
        if (isPrime(n))
        {
            System.out.println(1);
            System.out.println(n);
            return;
        }
        if (n < 10000)
        {

            if (n == 4)
            {
                System.out.println(2);
                System.out.println(2 + " " + 2);
                return;
            }
            if (n == 5)
            {
                System.out.println(1);
                System.out.println(5);
                return;
            }
            if (n == 6)
            {
                System.out.println(2);
                System.out.println(3 + " " + 3);
                return;
            }
            int x = n - 5;
            for (int i = 2; i <= x / 2; i++)
            {
                if (isPrime(i) && isPrime(x - i))
                {
                    a = i;
                    b = x - i;
                    System.out.println(3);
                    System.out.println(5 + " " + a + " " + b);
                    return;
                }
            }

        }
        else
        {
            int t = n - 300;
            int p1 = 0;
            for (int i = t; i <= n; i++)
            {
                if (isPrime(i))
                {
                    p1 = i;
                    break;
                }
            }
            int remn = n - p1;
            if (isPrime(remn))
            {
                System.out.println(2);
                System.out.println(remn + " " + p1);
                return;
            }
            else
            {
                for (int i = 2; i <= remn; i++)
                {
                    if (isPrime(i) && isPrime(remn - i))
                    {
                        if (remn - i > 0)
                        {
                            System.out.println(3);
                            int a1 = i;
                            int b1 = remn - i;
                            System.out.println(a1 + " " + b1 + " " + p1);
                            return;
                        }
                        else
                        {
                            System.out.println(2);
                            System.out.println(i + " " + p1);
                            return;
                        }
                    }
                }
            }
        }

    }
}

// if (isPrime(n))
// {
// res = n;
// k = 1;
// System.out.println(k);
// System.out.println(res);
// return;
// }
//
// if (a == 0 && b == 0)
// {
// int x = n - 5;
// for (int i = 2; i <= x / 2; i++)
// {
// if (isPrime(i) && isPrime(x - i))
// {
// a = i;
// b = x - i;
// }
// }
// System.out.println(3);
// System.out.println(5 + " " + a + " " + b);
// return;
// }
// if (res == 0)
// {
// for (int i = 2; i <= n / 2; i++)
// {
// if (isPrime(i) && isPrime(n - i))
// {
// a = i;
// b = n - i;
// }
// }
// System.out.println(2);
// System.out.println(a + " " + b);
// return;
// }

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.*;
import java.math.*;
import java.io.*;

/**
 *
 * @author magzhankairanbay
 */
public class Code {

    public static int gcd(int a, int b) {
        if (b==0) return a;
        return gcd(b,a%b);
     }
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        try {

            Scanner in = new Scanner(System.in);

            int n = in.nextInt();

            if (n == 3) {
                System.out.println(1);
                System.out.println(3);
                return;
            }

            if (n == 5) {
                System.out.println(2);
                System.out.println("2 3");
                return;
            }

            n -= 3;

            BigInteger b, a;

            for (int i = 2; i < n; i++) {
                b = BigInteger.valueOf(i);
                a = BigInteger.valueOf(n - i);
                if (b.isProbablePrime(i) && a.isProbablePrime(i)) {
                    System.out.println(3);
                    System.out.println(3 + " " + a + " " + b);
                    break;
                }
            }

        } catch(Exception ex) {

            System.out.println(ex.toString());
        }
    }

}

import java.util.Scanner;

public class DimaAndLisa
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		if(isPrime(n))
		{
			System.out.println(1);
			System.out.println(n);
		}
		else
		{
			System.out.println(3);
			System.out.print(3 + " ");
			n -= 3;

			if(isPrime(n-2))
			{
				System.out.print(2 + " ");
				System.out.print(n-2);
			}
			else
			for (int i = 3; i <= n/2; i+=2)
			{
				if(isPrime(i) && isPrime(n-i))
				{
					System.out.print(i + " ");
					System.out.println(n-i);
					return;
				}
			}
		}
	}

	static boolean isPrime(int n) {
	    if(n < 2) return false;
	    if(n == 2 || n == 3) return true;
	    if(n%2 == 0 || n%3 == 0) return false;
	    int sqrtN = (int)Math.sqrt(n)+1;
	    for(int i = 6; i <= sqrtN; i += 6) {
	        if(n%(i-1) == 0 || n%(i+1) == 0) return false;
	    }
	    return true;
	}
}

import java.util.Scanner;
public class dada {

	public static void main(String[] args) {

		Scanner scan = new Scanner (System.in);
		int n,k=0;
		n=scan.nextInt();
		if(judge(n)){
			System.out.println(1);
			System.out.println(n);
		}
		else if(judge(n-2)){
			System.out.println(2);
			System.out.printf("2 %d\n",n-2);

		}
		else if(judge(n-4)){
			System.out.println(3);
			System.out.printf("2  2 %d\n",n-4);
		}
		else {
			for( int i=n;i>=1;i--){
				if(judge(i)){
					k = i;
					break;
				}
			}
				if(judge(n - k)){

					System.out.println(2);
					System.out.printf("%d %d\n",k,n-k);
		  }
				else{
				    for(int i=2;i<=n-k;i++)
				    {
				        if(judge(i)&&judge(n-k-i))
				        {
				        	System.out.println(3);
				        	System.out.printf("%d %d %d\n",i,n-k-i,k);
				            break;
				        }
				    }
				}

		}

	}
	public static boolean judge(int a){
		if(a == 2 || a ==3) return true;
		else{
			for(int i=2;i<=Math.sqrt(a);i++){
				if(a%i==0) return false;
			}
			return true;

		}

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * User: Daniil
 * Date: 9/22/15
 * Time: 10:01 AM
 * To change this template use File | Settings | File Templates.
 */
public class Main {

    public static char[] res;

    public static void main(String[] args){

        Scanner scanner= new Scanner(new InputStreamReader(System.in));
        int n  = 0, t;

        n = scanner.nextInt();

        if (isPrime(n)){
            System.out.println("1");
            System.out.println(n);
            return;
        }

        for (int k = n - 2;; -- k){
            if (isPrime(k)){
                int diff = n - k;
                for (int j = 2; j < diff - 1; ++ j){
                    if (isPrime(j) && isPrime(diff - j)){
                        System.out.println("3");
                        System.out.println(k + " " + j + " " + (diff - j));
                        return;
                    }
                }
            }
        }
    }

    public static boolean isPrime(int n){
        for (int i = 2; i*i <= n; ++ i){
            if (n % i == 0)return false;
        }
        return true;
    }

}

import java.util.Scanner;
import java.util.ArrayList;
import java.util.HashSet;

public class Lisa{
	ArrayList<Integer> lst;
	HashSet<Integer> set;
	public static void main(String[] args) {
		Lisa exe =  new Lisa();
		exe.begin();
	}

	void build_primes(int n) {
		lst = new ArrayList<Integer>();
		set = new HashSet<Integer>();
		boolean prime[] = new boolean[100000000];
		for(int i=0;i<n;++i)
			prime[i] = true;

		set.add(2);
		lst.add(2);

		for(int i=3;i<n;i+=2) {
			if(prime[i]) {
				set.add(i);
				lst.add(i);
				for(int j=2*i;j<n;j+=i) {
					prime[j] = false;
				}
			}
		}
	}

	int closestPrime(int n) {
		if(isPrime(n)) return n;

		for(int i=n-4;i>0;--i){
			if(isPrime(i)) return i;
		}
		return -1;
	}

	boolean isPrime(int n) {
		int root;
		int div = 2;
		int ori = n;

		while(n%div==0)	n/=2;

		div = 3;
		root = (int)Math.sqrt(n)+1;
		while(div<root) {
			while(n%div==0) {
				n/=div;
				root = (int)Math.sqrt(n)+1;
			}

			div+= 2;
		}
		return (n==ori)?true:false;
	}

	void begin() {
		Scanner l = new Scanner(System.in);
		int n = l.nextInt();

		int bp = closestPrime(n);
		if(bp == n){
			System.out.println(1);
			System.out.println(n);
		} else {
			System.out.println(3);
			build_primes(n-bp);
			int a,b;
			a = b = 0;
			for(int i=0;i<lst.size();++i) {
				a = lst.get(i);
				b = n-bp-a;
				if(set.contains(b)) {
					break;
				}
			}

			System.out.println(bp+" "+a+" "+b);
		}

	}
}

/**
 * Created by Karan Jobanputra on 31-05-2017.
 */

import java.util.Scanner;
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class CF324D {
    public static boolean isPrime(int n)
    {
        if(n==2)
        {
            return true;
        }
        if(n%2 == 0)
        {
            return false;
        }
        for(int i=3;i<=sqrt(n);i+=2)
        {
            if(n%i==0) return false;
        }
        return true;
    }
    public static void main(String args[]) throws Exception {
        InputReader sc = new InputReader(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int n = sc.nextInt();
        if(isPrime(n))
        {
            pw.println("1");
            pw.println(n);
            pw.close();
            return;
        }
        if(isPrime(n-2))
        {
            pw.println("2");
            pw.println("2 "+(n-2));
            pw.close();
            return;
        }
        for(int i=3;i<n;i++)
        {
            if(isPrime(i))
            {
                int temp = n-i;
                if(isPrime((n-i)/2))
                {
                    pw.println("3");
                    int arr[] = new int[3];
                    arr[0] = i;
                    arr[1] = (n-i)/2;
                    arr[2] = (n-i)/2;
                    Arrays.sort(arr);
                    pw.println(arr[0]+" "+arr[1]+" "+arr[2]);
                    pw.close();
                    return;
                }
            }

        }

        pw.close();
    }

    static class Node implements Comparable<Node> {
        int v;
        int w;

        Node(int v, int w) {
            this.v = v;
            this.w = w;
        }

        public int compareTo(Node node) {
            if (w == node.w)
                return Integer.compare(v, node.v);

            return (-1) * Integer.compare(w, node.w);
        }
    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

}

import java.io.*;
import java.util.*;

public class Solution {

    private static void sieve(boolean[] primes) {
        Arrays.fill(primes, true);
        primes[0] = primes[1] = false;

        for (int i = 2; i < primes.length; i++)
            if (primes[i]) {
                for (int j = 2 * i; j < primes.length; j += i)
                    primes[j] = false;
            }
    }

    private static boolean isPrime(int n) {
        boolean prime = true;
        for (int i = 2; i <= Math.sqrt(n); i++)
            if (n % i == 0) {
                prime = false;
                break;
            }
        return prime;
    }

    private static void solve(InputReader in, OutputWriter out) {
        int n = in.nextInt();

        if (isPrime(n))
            out.print("1\n" + n);

        else {
            boolean[] primes = new boolean[300];
            sieve(primes);

            int p = 0;
            for (int i = n - 2; i >= 2; i--)
                if (isPrime(i)) {
                    p = i;
                    break;
                }

            n -= p;
            if (primes[n])
                out.print("2\n" + p + " " + n);

            else {
                boolean found = false;
                for (int i = 2; i < primes.length; i++) {
                    for (int j = i; j < primes.length; j++)
                        if (primes[i] && primes[j] && (i + j == n)) {
                            found = true;
                            out.print("3\n" + p + " " + i + " " + j);
                            break;
                        }

                    if (found) break;
                }
            }
        }
    }

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
        solve(in, out);
        in.close();
        out.close();
    }

    private static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        InputReader(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }

        String nextLine() {
            String line = null;
            try {
                line = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return line;
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String line = nextLine();
                if (line == null) return null;
                st = new StringTokenizer(line);
            }
            return st.nextToken();
        }

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

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

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

        void close() {
            try {
                br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    private static class OutputWriter {
        BufferedWriter bw;

        OutputWriter(OutputStream os) {
            bw = new BufferedWriter(new OutputStreamWriter(os));
        }

        void print(int i) {
            print(Integer.toString(i));
        }

        void println(int i) {
            println(Integer.toString(i));
        }

        void print(long l) {
            print(Long.toString(l));
        }

        void println(long l) {
            println(Long.toString(l));
        }

        void print(double d) {
            print(Double.toString(d));
        }

        void println(double d) {
            println(Double.toString(d));
        }

        void print(boolean b) {
            print(Boolean.toString(b));
        }

        void println(boolean b) {
            println(Boolean.toString(b));
        }

        void print(char c) {
            try {
                bw.write(c);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        void println(char c) {
            println(Character.toString(c));
        }

        void print(String s) {
            try {
                bw.write(s);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        void println(String s) {
            print(s);
            print('\n');
        }

        void close() {
            try {
                bw.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}

import java.util.*;

public class D {
	static HashSet<Integer> primeSet = new HashSet<>();
	static ArrayList<Integer> primes;

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		if (n == 3 || n == 5) {
			System.out.println(1);
			System.out.println(n);
			return;
		}
		int cand = 0;
		primes = generatePrimes(40000);
		n -= 3;
		for (int p : primes) {
			if (checkPrime(n - p)) {
				cand = p;
				break;
			}
		}
		System.out.println(3);
		System.out.println("3 " + cand + " " + (n-cand));
	}

	private static boolean checkPrime(int n) {
		if (primeSet.contains(n)) return true;
		for (int p: primes) {
			if (n % p == 0) return false;
			if (p > (int) Math.sqrt(n) + 10) break;
		}
		return true;
	}

	static ArrayList<Integer> generatePrimes(int limit) {
	    final int numPrimes = countPrimesUpperBound(limit);
	    ArrayList<Integer> primes = new ArrayList<Integer>(numPrimes);
	    boolean [] isComposite    = new boolean [limit];   // all false
	    final int sqrtLimit       = (int)Math.sqrt(limit); // floor
	    for (int i = 2; i <= sqrtLimit; i++) {
	        if (!isComposite [i]) {
	            primes.add(i);
	            primeSet.add(i);
	            for (int j = i*i; j < limit; j += i) // `j+=i` can overflow
	                isComposite [j] = true;
	        }
	    }
	    for (int i = sqrtLimit + 1; i < limit; i++)
	        if (!isComposite [i]) {
	            primes.add(i);
	            primeSet.add(i);
	        }
	    return primes;
	}

	static int countPrimesUpperBound(int max) {
	    return max > 1 ? (int)(1.25506 * max / Math.log((double)max)) : 0;
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class ProblemD {
    private static List<Integer> primes = new ArrayList<Integer>();

    public static void main(String[] args) {
        InputReader in = new InputReader();
        PrintWriter out = new PrintWriter(System.out);

        new ProblemD().solve(in, out);

        out.close();
    }

    public void solve(InputReader in, PrintWriter out) {
        int n = in.nextInt();

        if (isPrime(n)) {
            out.println(1);
            out.print(n);

            return;
        }

        int k = (n + 1) / 2;

        for (int i = 3; i <= k; i++) {
            if (isPrime(i)) {
                int t = (n - i) / 2;

                if (isPrime(t)) {
                    out.println(3);
                    out.print(i + " " + t + " " + t);
                    return;
                }
            }
        }
    }

    public static boolean isPrime(int n) {
        if (primes.contains(n)) {
            return true;
        }

        if (n == 2) {
            return true;
        }

        if (n <= 1 || n % 2 == 0) {
            return false;
        }

        for (int i = 3; i * i <= n; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }

        primes.add(n);

        return true;
    }

    static class InputReader {
        public BufferedReader br;
        public StringTokenizer st;

        public InputReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

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

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.util.*;
import java.math.*;
public class CF324D {
	public static void main(String[] args){
		Scanner kb = new Scanner(System.in);
	    int n = kb.nextInt();
	    int start = n - 2;
	    if(p(n))
	    {
	        System.out.println("1\n"+n);
	        return;
	    }
	    while(true)
	    {
	        if(p(start))
	        {
	            int left = n - start;
	            if(p(left))
	            {
	                System.out.println("2\n"+start+" "+left);
	                return;
	            }
	            for(int j = 2; j<=left-2; j++) if(p(j) && p(left-j))
	            {
	                System.out.println("3\n"+start+" "+j+" "+(left-j));
	                return;
	            }
	        }
	        start--;
	    }
	}
	static boolean p(int n)
	{
	    if(n < 2) return false;
	    if(n > 1e5) return BigInteger.valueOf(n).isProbablePrime(40);
	    for(int i = 2; i<=Math.sqrt(n); i++) if(n%i == 0) return false;
	    return true;
	}
}

import java.util.Scanner;

public class PrimeSums {

  private static final int MAXC = 888;
  private int[][] DP;

  private boolean isPrime(int n) {
    if (n < 2) {
      return false;
    }
    if (n == 2) {
      return true;
    }
    if (n % 2 == 0) {
      return false;
    }
    for (int i = 3; i * i <= n; i += 2) {
      if (n % i == 0) {
        return false;
      }
    }
    return true;
  }

  private void constructAll(int to) {
    DP = new int[to+1][2];
    for (int i = 2; i <= to; ++i) {
      if (isPrime(i)) {
        DP[i][0] = i;
      }
    }
    for (int i = 3; i <= to; ++i) {
      if (DP[i][0] > 0) {
        continue;
      }
      for (int j = 2; j < i; ++j) {
        if (DP[j][0] > 0 && DP[i - j][0] > 0) {
          DP[i][1] = j;
          break;
        }
      }
    }
  }

  public static void main(String[] args) {
    PrimeSums ps = new PrimeSums();
    ps.constructAll(MAXC);
    int n = new Scanner(System.in).nextInt();
    if (ps.isPrime(n)) {
      System.out.println("1");
      System.out.println(n);
    } else {
      int start = (n % 2 == 0 ? n - 1 : n - 2);
      for (int k = start; k > 0; --k) {
        if (ps.isPrime(k)) {
          int t = n - k;
          if (ps.DP[t][0] > 0) {
            System.out.println("2");
            System.out.println(k + " " + t);
            break;
          } if (ps.DP[t][1] > 0) {
            System.out.println("3");
            System.out.println(k + " " + ps.DP[t][1] + " " + (t - ps.DP[t][1]));
            break;
          }
        }
      }
    }
  }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collection;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.stream.Stream;

public class Solution implements Runnable {

	static final int MOD = (int) 1e9 + 7;
	static final Reader in = new Reader();
	static final PrintWriter out = new PrintWriter(System.out);
	StringBuilder answer = new StringBuilder();

	public static void main(String[] args) {
		new Thread(null, new Solution(), "persefone", 1 << 28).start();
	}

	@Override
	public void run() {
		solve();
		printf();
	}

	void solve() {
		int n = in.nextInt();
		if (isPrime(n)) { out.println(1);  printf(n); return; }
		if (isPrime(n - 2)) { out.println(2); out.print(2 + " " + (n - 2)); return; }
		if (isPrime(n - 4)) { out.println(3); out.print(2 + " " + 2 + " " + (n - 4)); return; }

		if (n % 2 == 0) {
			out.println(2);
			prime_2(n);
		} else {
			out.println(3);
			out.print(3 + " ");
			prime_2(n - 3);
		}

	}

	void prime_2(int n) {
		for (int i = 2; i < 1000; i++) if (isPrime(i) && isPrime(n - i)) {
			out.print(i + " " + (n - i));
			break;
		}
	}

	boolean isPrime(int n) {
		double m = Math.sqrt(n);
		for (int i = 2; i <= m; i++) if (n % i == 0) return false;
		return true;
	}

	void printf() {
		out.print(answer);
		out.close();
	}

	void printf(Stream<?> str) {
		str.forEach(o -> add(o, " "));
		add("\n");
	}

	void printf(Object... obj) {
		printf(false, obj);
	}

	void printfWithDescription(Object... obj) {
		printf(true, obj);
	}

	private void printf(boolean b, Object... obj) {

		if (obj.length > 1) {
			for (int i = 0; i < obj.length; i++) {
				if (b) add(obj[i].getClass().getSimpleName(), " - ");
				if (obj[i] instanceof Collection<?>) {
					printf((Collection<?>) obj[i]);
				} else printf(obj[i]);
			}
			return;
		}

		if (b) add(obj[0].getClass().getSimpleName(), " - ");
		printf(obj[0]);
	}

	void printf(Object o) {
		if (o instanceof int[])
			printf(Arrays.stream((int[]) o).boxed());
		else if (o instanceof char[])
			printf(new String((char[]) o));
		else if (o instanceof long[])
			printf(Arrays.stream((long[]) o).boxed());
		else if (o instanceof double[])
			printf(Arrays.stream((double[]) o).boxed());
		else
			add(o, "\n");
	}

	void printf(Collection<?> col) {
		printf(col.stream());
	}

	<T, K> void add(T t, K k) {
		if (t instanceof Collection<?>) {
			((Collection<?>) t).forEach(i -> add(i, " "));
		} else if (t instanceof Object[]) {
			Arrays.stream((Object[]) t).forEach(i -> add(i, " "));
		} else
			add(t);
		add(k);
	}

	<T> void add(T t) {
		answer.append(t);
	}

	@SuppressWarnings("unchecked")
	<T extends Comparable<? super T>> T min(T... t) {
		if (t.length == 0)
			return null;
		T m = t[0];
		for (int i = 1; i < t.length; i++)
			if (t[i].compareTo(m) < 0)
				m = t[i];
		return m;
	}

	@SuppressWarnings("unchecked")
	<T extends Comparable<? super T>> T max(T... t) {
		if (t.length == 0)
			return null;
		T m = t[0];
		for (int i = 1; i < t.length; i++)
			if (t[i].compareTo(m) > 0)
				m = t[i];
		return m;
	}

	int gcd(int a, int b) {
		return (b == 0) ? a : gcd(b, a % b);
	}

	long gcd(long a, long b) {
		return (b == 0) ? a : gcd(b, a % b);
	}

	// c = gcd(a, b) -> extends gcd method: ax + by = c <----> (b % a)p + q = c;
	int[] ext_gcd(int a, int b) {
		if (b == 0) return new int[] {a, 1, 0 };
		int[] vals = ext_gcd(b, a % b);
		int d = vals[0]; // gcd
	    int p = vals[2]; //
		int q = vals[1] - (a / b) * vals[2];
		return new int[] { d, p, q };
	}

	// find any solution of the equation: ax + by = c using extends gcd
	boolean find_any_solution(int a, int b, int c, int[] root) {
		int[] vals = ext_gcd(Math.abs(a), Math.abs(b));
		if (c % vals[0] != 0) return false;
		printf(vals);
		root[0] = c * vals[1] / vals[0];
		root[1] = c * vals[2] / vals[0];
		if (a < 0) root[0] *= -1;
		if (b < 0) root[1] *= -1;
		return true;
	}

	int mod(int x) { return x % MOD; }

	int mod(int x, int y) { return mod(mod(x) + mod(y)); }

	long mod(long x) { return x % MOD; }

	long mod (long x, long y) { return mod(mod(x) + mod(y)); }

	static class Pair<K extends Comparable<? super K>, V extends Comparable<? super V>>
			implements Comparable<Pair<K, V>> {
		private K k;
		private V v;

		Pair() {}

		Pair(K k, V v) {
			this.k = k;
			this.v = v;
		}

		K getK() { return k; }

		V getV() { return v; }

		void setK(K k) { this.k = k; }

		void setV(V v) { this.v = v; }

		void setKV(K k, V v) {
			this.k = k;
			this.v = v;
		}

		@SuppressWarnings("unchecked")
		@Override
		public boolean equals(Object o) {
			if (this == o) return true;
			if (o == null || !(o instanceof Pair)) return false;
			Pair<K, V> p = (Pair<K, V>) o;
			return k.compareTo(p.k) == 0 && v.compareTo(p.v) == 0;
		}

		@Override
		public int hashCode() {
			int hash = 31;
			hash = hash * 89 + k.hashCode();
			hash = hash * 89 + v.hashCode();
			return hash;
		}

		@Override
		public int compareTo(Pair<K, V> pair) {
			return k.compareTo(pair.k) == 0 ? v.compareTo(pair.v) : k.compareTo(pair.k);
		}

		@Override
		public Pair<K, V> clone() {
			return new Pair<K, V>(this.k, this.v);
		}

		@Override
		public String toString() {
			return String.valueOf(k).concat(" ").concat(String.valueOf(v)).concat("\n");
		}
	}

	static class Reader {
		private BufferedReader br;
		private StringTokenizer st;

		Reader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			try {
				while (st == null || !st.hasMoreTokens()) {
					st = new StringTokenizer(br.readLine());
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
			return st.nextToken();
		}

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

		int[] nextIntArray(int n) {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++)
				arr[i] = nextInt();
			return arr;
		}

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

		String nextLine() {
			String s = "";
			try {
				s = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return s;
		}
	}
}

import java.util.*;
public class Ace
{
    public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
     int n,i=0,j=0,k=0,l,m,count=3,ak=9,bk=9,ck=9;
     ip bn=new ip();
     n=sc.nextInt();
     n=n-3;
     if(n==0)
     {
         System.out.println(1);
 System.out.println(3);
     }

     else
     {
         for(i=2;i<=n;i++)
     {

      if(bn.isprime(i)==0&& (n-i)==0)
         { System.out.println(2);
 System.out.println(3+" "+i);
 break; }
      if(bn.isprime(i)==0&&bn.isprime(n-i)==0)
 { System.out.println(3);
 System.out.println(3+" "+i+" "+(n-i));
 break; }

     }

     }

     }
}
class ip
{
    public int isprime(int p)
    {
        int flag=0,n=p,i;
        for(i=2;i*i<=n;i++)
        {
            if(n%i==0) { flag=1; break; }
        }
    return(flag);
    }

}

//3

import java.util.Arrays;
import java.util.Scanner;

public class DimaAndLisa {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		if (isPrime(N))
			System.out.println("1\n" + N);
		else {
			int number1 = 0;
			int number2 = 0;
			int number3 = 0;
			boolean done = false;
			for (int i = N - 1; i >= 2; i--) {
				if (done)
					break;
				if (isPrime(i)) {
					number1 = i;
					number2 = number3 = 0;
					for (int j = N - i; j >= 2; j--) {
						if (done)
							break;
						number3 = 0;
						boolean temp = isPrime(j);
						if (temp && j + number1 == N) {
							number2 = j;
							done = true;
							break;
						} else if (temp && j + i < N) {
							number2 = j;
							for (int z = N - i - j; z >= 2; z--) {
								boolean temp2 = isPrime(z);
								if (temp2 && z + number1 + number2 == N) {
									number3 = z;
									done = true;
									break;
								} else if (temp2 && z + number1 + number2 < N)
									z = 1;
							}
						}
					}
				}
			}
			if (number2 != 0 && number3 != 0)
				System.out.printf("3\n%d %d %d", number1, number2, number3);
			else
				System.out.printf("2\n%d %d", number1, number2);
			scan.close();
		}
	}

	static boolean isPrime(int N) {
		for (int i = 2; i <= Math.sqrt(N); i++)
			if (N % i == 0)
				return false;
		return true;

	}
}

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;

public class Solution {
    BufferedReader in;
    PrintWriter out;
    StringTokenizer st;

    final int N = 1000010;
    final int K = 1000010;

    void solve() throws IOException {
        //in = new BufferedReader(new InputStreamReader(new FileInputStream("input.txt")));
        //out = new PrintWriter(new OutputStreamWriter(new FileOutputStream("output.txt")));
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));

        int n = nextInt();

        boolean used[] = new boolean[N];
        int p[] = new int[K];

        int k = 0;
        for(int i = 2; i < N; i++) {
            if (!used[i]) {
                p[k++] = i;
                for(int j = 2 * i; j < N; j += i)
                    used[j] = true;
            }
        }

        if (BigInteger.valueOf(n).isProbablePrime(20)) {
            out.println(1);
            out.println(n);
        } else {
            int cur = n;
            while (true) {
                if (!BigInteger.valueOf(cur).isProbablePrime(20)) {
                    cur--;
                    continue;
                }
                boolean ok = false;
                for (int i = 0; i < k; i++) {
                    int t = n - cur - p[i];
                    if (t == 0) {
                        out.println(2);
                        out.println(cur + " " + p[i]);
                        ok = true;
                        break;
                    } else if (t > 1) {
                        if (!used[t]) {
                            out.println(3);
                            out.println(cur + " " + p[i] + " " + t);
                            ok = true;
                            break;
                        }
                    } else {
                        break;
                    }
                }
                if (ok) break;
            }
        }

        in.close();
        out.close();
    }

    public static void main(String[] args) throws IOException {
        new Solution().solve();
    }

    String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }

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

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

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

import java.util.ArrayList;
import java.util.Scanner;

public class D {
	int n;

	void readInput(){
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
	}

	boolean isprime(int n){
		if (n==2)
			return true;
		int d = 2;
		while(d*d<=n){
			if (n%d==0)
				return false;
			d++;
		}
		return true;
	}

	void solve(){
		int p = n;
		while(isprime(p)==false)
			p--;
		int m = n-p;
		if (m==0){
			System.out.println(1);
			System.out.println(p);
			return;
		}
		if (m==2){
			System.out.println(2);
			System.out.println(2+" "+p);
			return;
		}

		boolean sieve[] = new boolean[m+1];
		ArrayList<Integer> primes = new ArrayList<Integer>();
		for(int i=2; i<=m/2; i++){
			if (sieve[i]==false){
				for(int j=i*i; j<=m; j+=i)
					sieve[j] = true;
				primes.add(i);
			}
		}
		for(Integer p1:primes)
			if ( sieve[m-p1] == false){
				System.out.println(3);
				System.out.println(m-p1+" "+p1+" "+p);
				return;
			}

		System.out.println("error");
	}

	public static void main(String[] args) {
		D d = new D();
		d.readInput();
		d.solve();
	}

}

import java.io.*;
import java.util.*;
import java.math.*;

public class p584d {
    public static int MAX = 20000000;
    public static boolean[] isPrime = new boolean[MAX];

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        isPrime[0] = true; isPrime[1] = true;
        for (int i = 2; i < MAX; i++) {
            if (!isPrime[i]) {
                int j = i + i;
                while (j < MAX) {
                    isPrime[j] = true;
                    j += i;
                }
            }
        }
        int n = in.nextInt();
        if (n % 2 == 1) {
            if (Prime_Check(n)) {
                out.println("1");
                out.println(n);
            } else {
                boolean ch = false;
                if (Prime_Check(n - 2)) {
                    out.println("2");
                    out.println("2" + " " + (n - 2));
                } else {
                    n -= 3;
                    int idx = 0;
                    for (int i = 3; i < n / 2; i++) {
                        if (Prime_Check(i) && Prime_Check(n - i)) {
                            idx = i;
                            ch = true;
                            break;
                        }
                    }
                    if (ch) {
                        out.println("3");
                        out.println("3" + " " + idx + " " + (n - idx));
                    } else out.println(":'(");
                }
            }
        } else {
            if (n == 2) {
                out.println("1");
                out.println(n);
            } else {
                boolean ch = false;
                int idx = 0;
                for (int i = 3; i < n / 2; i++) {
                    if (Prime_Check(i) && Prime_Check(n - i)) {
                        idx = i;
                        ch = true;
                        break;
                    }
                }
                if (ch) {
                    out.println("3");
                    out.println("3" + " " + idx + " " + (n - idx));
                } else out.println(":'(");
            }
        }
        out.close();
    }

    public static boolean Prime_Check(long n) {
        if (n < MAX) {
            return !isPrime[(int)n];
        } else {
            return Miller_Rabin(n, 5);
        }
    }

    public static boolean Miller_Rabin(long n, int iteration) {
        if (n == 0 || n == 1) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        if (n % 2 == 0) {
            return false;
        }
        long s = n - 1;
        while (s % 2 == 0) {
            s /= 2;
        }
        Random rand = new Random();
        for (int i = 1; i <= iteration; i++) {
            long r = Math.abs(rand.nextLong());
            long a = r % (n - 1) + 1;
            long temp = s;
            long mod = modpow(a, temp, n);
            while (temp != n - 1 && mod != 1 && mod != n - 1) {
                mod = mulmod(mod, mod, n);
                temp *= 2L;
            }
            if (mod != n - 1 && temp % 2 == 0) {
                return false;
            }
        }
        return true;
    }

    public static long modpow(long a, long p, long n) {
        long r = a % n;
        if (p == 0) {
            return 1;
        }
        if (p == 1) {
            return r;
        }
        if (p % 2 == 1) {
            r = modpow(a, p / 2, n) % n;
            r = r * r % n;
            return r * a % n;
        } else {
            r = modpow(a, p / 2, n) % n;
            r = r * r % n;
            return r;
        }
    }

    public static long mulmod(long a, long b, long mod) {
        return BigInteger.valueOf(a).multiply(BigInteger.valueOf(b)).mod(BigInteger.valueOf(mod)).longValue();
    }

    static class Pair implements Comparable<Pair> {
        int x;
        int y;

        public Pair(int x, int y) {
            super();
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Pair p) {
            return x < p.x ? -1 : x > p.x ? 1 : 0;
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

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

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

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return null;
        }

        public boolean hasMoreElements() {
            while (tokenizer == null || !tokenizer.hasMoreElements()) {
                String s;
                try {
                    s = reader.readLine();
                } catch (IOException e) {
                    return false;
                }
                tokenizer = new StringTokenizer(s);
            }
            return tokenizer.hasMoreElements();
        }
    }
}

import java.util.*;

public class Codechef {
    static ArrayList<Integer> primes=new ArrayList<Integer>();
    static void inti(){
        int arr[]=new int[301];
        arr[1]=1;
        for(int i=2;i<301;i++){
            if(arr[i]==0){
                int j=2*i;
                while(j<301){
                    arr[j]=1;
                    j+=i;
                }
            }
        }
        for(int i=0;i<301;i++){
            if(arr[i]==0)
                primes.add(i);
        }
    }

    static boolean isPrime(int number) {
        if (number <= 1) return false; // zero and one are not prime
        int i;
        for (i=2; i*i<=number; i++) {
            if (number % i == 0) return false;
        }
        return true;
    }

    public static void main(String[] args) {
        // TODO Auto-generated method stub
       Scanner in=new Scanner(System.in);
       inti();
       int n=in.nextInt();
       int i=n;
       while(true){
           if(isPrime(i))
               break;
           i--;
       }
       //System.out.println(i);
       int left=n-i;
       if(left==0){
           System.out.println("1");
           System.out.println(n);
           System.exit(0);
       }
       int j=0,k=primes.size()-1;
       //System.out.1println(primes);
           if(isPrime(left)){
               System.out.println("2");
               System.out.println(i+" "+left);
               System.exit(0);
           }
           else
           {
               for(j=0;j<k;j++){
                int diff=left-primes.get(j);
                if(isPrime(diff)){
                    System.out.println("3");
                    System.out.println(i+" "+diff+" "+primes.get(j));
                    System.exit(0);
                }
               }
           }
           System.out.println("-1");
       in.close();
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @author Don Li
 */
public class DimaAndLisa {
    void solve() {
        int n = in.nextInt();
        if (isPrime(n)) {
            out.println(1);
            out.println(n);
            return;
        }
        if (isPrime(n - 2)) {
            out.println(2);
            out.println(2 + " " + (n - 2));
            return;
        }
        for (int x = n - 1; x >= 2; x--) {
            if (isPrime(x)) {
                for (int y = 2; y <= 300; y++) {
                    if (isPrime(y)) {
                        int z = n - x - y;
                        if (isPrime(z)) {
                            out.println(3);
                            out.println(x + " " + y + " " + z);
                            break;
                        }
                    }
                }
                break;
            }
        }
    }

    private boolean isPrime(int n) {
        if (n <= 1) return false;
        int r = (int) Math.sqrt(n);
        for (int i = 2; i <= r; i++) {
            if (n % i == 0) return false;
        }
        return true;
    }

    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new DimaAndLisa().solve();
        out.close();
    }

    static FastScanner in;
    static PrintWriter out;

    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;

        public FastScanner(BufferedReader in) {
            this.in = in;
        }

        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

/*
Keep solving problems.
*/
import java.util.*;
import java.io.*;

public class CF584D {

    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    final long MOD = 1000L * 1000L * 1000L + 7;

    void solve() throws IOException {
        int n = nextInt();
        int m = 10000 + 10;
        boolean[] seive = new boolean[m];
        Arrays.fill(seive, true);
        for(int i = 2; i < m; i++) {
            if(seive[i]) {
                for(int j = 2; j * i < m; j++) {
                    seive[i * j] = false;
                }
            }
        }

        if(n < m) {
            if(seive[n]) {
                outln(1);
                out(n);
                return;
            }
        }
        for(int i = 2; i < m; i++) {
            if(n - i < m) {
                if(n - i >= 2 && seive[i] && seive[n - i]) {
                    outln(2);
                    out(i + " " + (n - i));
                    return;
                }
            }
        }

        for(int i = n - 1; ; i--) {
            boolean tmp = isPrime(i);
            if(tmp) {
                int need = n - i;
                for(int j = 2; j < m; j++) {
                    if(need - j >= 2 && seive[j] && seive[need - j]) {
                        outln(3);
                        out(i + " " + j + " " + (need - j));
                        return;
                    }
                }
            }
        }

    }
    boolean isPrime(int num) {
        for(int i = 2; i * i <= num; i++) {
            if(num % i == 0) {
                return false;
            }
        }
        return true;
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }
    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    public CF584D() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CF584D();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}

import java.awt.Point;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.StringTokenizer;
import static java.lang.Math.*;
import java.util.Map;
import java.util.Scanner;

/**
 *
 * @author Mojtaba
 */
public class Main {

    static int[] from;

    public static void main(String[] args) throws IOException {
        MyScanner in = new MyScanner(System.in);
        PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out));
        StringBuilder sb = new StringBuilder("");

        int n = in.nextInt();
        search:
        {
            for (int i = n; i >= 1; i--) {
                if (isPrime(i)) {
                    int nmi = n - i;
                    if (nmi == 0) {
                        sb.append("1\n").append(i);
                        break search;
                    }
                    if (nmi == 2) {
                        sb.append("2\n2 ").append(i);
                        break search;
                    }
                    for (int j = 2; j < nmi; j++) {
                        if (isPrime(nmi - j) && isPrime(j)) {
                            sb.append("3\n").append(i).append(" ").append(nmi - j).append(" ").append(j);
                            break search;
                        }
                    }
                }
            }
        }

        //System.out.println(sb.toString().trim());
        writer.println(sb.toString().trim());
        writer.flush();
        in.close();
    }

    static void sort(int[] a) {
        Random rand = new Random();
        for (int i = a.length - 1; i > 0; i--) {
            int index = rand.nextInt(i + 1);
            // Simple swap
            int temp = a[index];
            a[index] = a[i];
            a[i] = temp;
        }
        Arrays.sort(a);
    }

    private static boolean isPrime(int n) {
        if (n < 2) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        if (n % 2 == 0) {
            return false;
        }
        int lim = (int) sqrt(n);
        for (int i = 3; i <= lim; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }
}

class MyScanner {

    BufferedReader reader;
    StringTokenizer tokenizer;

    public MyScanner(InputStream stream) {
        this.reader = new BufferedReader(new InputStreamReader(stream));
    }

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

    public int[] nextIntegerArray(int n) throws IOException {
        int[] a = new int[n];
        for (int i = 0; i < a.length; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    public long[] nextLongArray(int n) throws IOException {
        long[] a = new long[n];
        for (int i = 0; i < a.length; i++) {
            a[i] = nextLong();
        }
        return a;
    }

    public int nextInt(int radix) throws IOException {
        return Integer.parseInt(next(), radix);
    }

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

    public long nextLong(int radix) throws IOException {
        return Long.parseLong(next(), radix);
    }

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

    public BigInteger nextBigInteger() throws IOException {
        return new BigInteger(next());
    }

    public BigInteger nextBigInteger(int radix) throws IOException {
        return new BigInteger(next(), radix);
    }

    public String next() throws IOException {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
            return this.next();
        }
        return tokenizer.nextToken();
    }

    public void close() throws IOException {
        this.reader.close();
    }
}

import java.util.*;
import java.io.*;
import java.math.*;

public class D {
	static ArrayList<Integer> primes = new ArrayList<Integer>();
	static boolean[] p = new boolean[10000000];

	static void sieve() {
		for (long i=2; i<10000000; i++) {
			if (p[(int)i]) continue;
			primes.add((int)i);
			for (long j=i*i; j<10000000; j+=i) {
				p[(int)j] = true;
			}
		}
	}

	public static void main(String[] args) throws Exception {
		sieve();
		Scanner sc = new Scanner(System.in);
		BigInteger n = sc.nextBigInteger();
		if (n.isProbablePrime(15)) {
			System.out.println(1);
			System.out.println(n.toString());
			return;
		}
		if (n.subtract(BigInteger.valueOf(2)).isProbablePrime(15)) {
			System.out.println(2);
			System.out.println("2 " + n.subtract(BigInteger.valueOf(2)).toString());
			return;
		}
		BigInteger x = n;
		while (!x.isProbablePrime(15)) {
			x = x.subtract(BigInteger.valueOf(2));
		}
		int a = n.subtract(x).intValue();
		for (int i=0; i<primes.size(); i++) {
			if (primes.get(i) > a) break;
			if (!p[a-primes.get(i)]) {
				System.out.println(3);
				System.out.println("" + x.toString() + " " + primes.get(i) + " " + (a-primes.get(i)));
				return;
			}
		}
	}
}

import java.util.Scanner;

public class Main
{
    private static boolean isPrime(int x)
    {
        double d = Math.sqrt((double) x);
        int s = (int) d;
        for (int i = 2; i <= s; i++)
        {
            if (x % i == 0)
            {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        int n = Integer.parseInt(s1);
        int a = 0, b = 0;
        int k = 0;
        int res = 0;
        if (isPrime(n))
        {
            System.out.println(1);
            System.out.println(n);
            return;
        }
        if (n < 10000)
        {

            if (n == 4)
            {
                System.out.println(2);
                System.out.println(2 + " " + 2);
                return;
            }
            if (n == 5)
            {
                System.out.println(1);
                System.out.println(5);
                return;
            }
            if (n == 6)
            {
                System.out.println(2);
                System.out.println(3 + " " + 3);
                return;
            }
            int x = n - 5;
            for (int i = 2; i <= x / 2; i++)
            {
                if (isPrime(i) && isPrime(x - i))
                {
                    a = i;
                    b = x - i;
                    System.out.println(3);
                    System.out.println(5 + " " + a + " " + b);
                    return;
                }
            }

        }
        else
        {
            int t = n - 300;
            int p1 = 0;
            for (int i = t; i <= n; i++)
            {
                if (isPrime(i))
                {
                    p1 = i;
                    break;
                }
            }
            int remn = n - p1;
            if (isPrime(remn))
            {
                System.out.println(2);
                System.out.println(remn + " " + p1);
                return;
            }
            else
            {
                for (int i = 2; i <= remn; i++)
                {
                    if (isPrime(i) && isPrime(remn - i))
                    {
                        if (remn - i > 0)
                        {
                            System.out.println(3);
                            int a1 = i;
                            int b1 = remn - i;
                            System.out.println(a1 + " " + b1 + " " + p1);
                            return;
                        }
                        else
                        {
                            System.out.println(2);
                            System.out.println(i + " " + p1);
                            return;
                        }
                    }
                }
            }
        }

    }
}

// if (isPrime(n))
// {
// res = n;
// k = 1;
// System.out.println(k);
// System.out.println(res);
// return;
// }
//
// if (a == 0 && b == 0)
// {
// int x = n - 5;
// for (int i = 2; i <= x / 2; i++)
// {
// if (isPrime(i) && isPrime(x - i))
// {
// a = i;
// b = x - i;
// }
// }
// System.out.println(3);
// System.out.println(5 + " " + a + " " + b);
// return;
// }
// if (res == 0)
// {
// for (int i = 2; i <= n / 2; i++)
// {
// if (isPrime(i) && isPrime(n - i))
// {
// a = i;
// b = n - i;
// }
// }
// System.out.println(2);
// System.out.println(a + " " + b);
// return;
// }

import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;

public class A {
	static long mod = 5000001;

	public static void main(String[] args) {

		Scanner nik = new Scanner(System.in);
		int n = nik.nextInt();

		boolean[] b = new boolean[10000001];
		Arrays.fill(b, true);
		b[0] = false;
		b[1] = false;
		for (int i = 2; i < b.length; i++) {
			if (b[i]) {
				int p = 2;

				while (p * i < b.length) {
					b[p * i] = false;
					p++;
				}
			}
		}
		HashSet<Integer> ht = new HashSet<>();
		for (int i = 2; i < b.length; i++) {
			if (b[i]) {
				ht.add(i);
			}
		}
		if (n == 3) {
			System.out.println(1 + "\n" + 3);
		} else {

			System.out.print(3 + "\n" + 3 + " ");
			n -= 3;

			for (int val : ht) {

				int temp = n - val;
				if (ht.contains(temp)) {
					System.out.print(val + " " + temp);
					break;
				}
			}
		}
	}

}

import java.util.* ;
import java.io.* ;

public class DimaAndLisa
{
    public static void main(String args[]) throws Exception
    {
        BufferedReader bro = new BufferedReader(new InputStreamReader(System.in)) ;
        int n = Integer.parseInt(bro.readLine()) ;
        List<Integer> primes = sieve((int)1e6);
        for(int i=0;i<primes.size();i++)
        {
            if(isPrime(n-3-primes.get(i)))
            {
                System.out.println("3 "+primes.get(i)+" "+(n-3-primes.get(i)));
                break ;
            }
        }
    }
    static boolean isPrime(int n)
    {
        for(int i=2;i*i<=n;i++)
        {
            if(n%i==0) return false ;
        }
        return true ;
    }
    static List<Integer> sieve(int n)
    {
        boolean[] notPrime = new boolean[n] ;
        for(int i=2;i*i<n;i++)
        {
            for(int j=i*i;j<n;j+=i)
            {
                notPrime[j] = true ;
            }
        }
        List<Integer> L = new ArrayList<Integer>() ;
        for(int i=2;i<n;i++)
        {
            if(!notPrime[i]) L.add(i) ;
        }
        return L ;
    }
}

import java.util.Scanner;

public class DimaAndLisa
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		if(isPrime(n))
		{
			System.out.println(1);
			System.out.println(n);
		}
		else
		{
			if(n%2 != 0)
			{
				System.out.println(3);
				System.out.print(2 + " ");
				n -= 2;
			}
			else
				System.out.println(2);

			if(isPrime(n-2))
			{
				isPrime(n-2);
				System.out.print(2 + " ");
				System.out.print(n-2);
			}
			else
			for (int i = 3; i <= n/2; i+=2)
			{
				if(isPrime(i) && isPrime(n-i))
				{
					System.out.print(i + " ");
					System.out.println(n-i);
					return;
				}
			}
		}
	}

	static boolean isPrime(int n) {
	    if(n < 2) return false;
	    if(n == 2 || n == 3) return true;
	    if(n%2 == 0 || n%3 == 0) return false;
	    int sqrtN = (int)Math.sqrt(n)+1;
	    for(int i = 6; i <= sqrtN; i += 6) {
	        if(n%(i-1) == 0 || n%(i+1) == 0) return false;
	    }
	    return true;
	}
}

import java.util.*;
public class Ideone
{
    public static boolean isPrime(int x)
    {
        if (x == 0 || x == 1)
            return false;

        for (int i = 2; i * i <= x; ++i)
            if (x % i == 0)
                return false;
        return true;
    }
    public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
         if (isPrime(n)){
        	System.out.println("2");
            System.out.print(n);}

        else if (isPrime(n-2)){
        	System.out.println("2");
            System.out.print(2+" "+(n-2));}

        else
        {
            System.out.println("3");
            System.out.print(3+" ");
            n = n - 3;
            for (int i = 0; i < n; i++) {
                if (isPrime(i) && isPrime(n - i)) {
                    System.out.print(i+" "+(n - i));
                    break;
                }
            }
        }
    }
}

import java.io.*;
import java.util.*;
public class dimaandliA {
    public static void main(String[] args) throws Exception
    {
        InputReader in=new InputReader(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=in.nextInt();
        if(isPrime(n))
        {
            pw.println(1);
            pw.println(n);
        }
        else if(isPrime(n-2))
        {
            pw.println(2);
            pw.println(n-2+" "+2);
        }
        for(int i=3;;i+=2)
        {
            if(isPrime(i) && isPrime(n-i-3))
            {
                pw.println(3);
                pw.println(i+" "+(n-i-3)+" "+3);
                break;

            }
        }

        pw.close();

    }

    public  static boolean isPrime(int num) {
        if (num == 2 ) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
        return true;
}

     static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }

            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

}

import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
import java.util.StringTokenizer;

public class D {

	public static void dfs(long n, LinkedList<Long> p){
		for(long i = n; i > 1; i--){
			final long floor = (long)Math.floor(Math.sqrt(i));

			boolean ok = true;
			for(long j = 2; j <= floor; j++){
				if(i % j == 0){
					ok = false;
					break;
				}
			}

			if(ok){
				p.add(i);
				if(n != i){
					dfs(n - i, p);
				}
				return;
			}
		}
	}

	public static void main(String[] args) {

		try (final Scanner sc = new Scanner(System.in)) {
			final long n = sc.nextLong();

			LinkedList<Long> list = new LinkedList<Long>();
			dfs(n, list);

			//System.out.println(list);

			System.out.println(list.size());
			boolean first = true;
			for(long i : list){
				if(first){
					first = false;
				}else{
					System.out.print(" ");
				}

				System.out.print(i);
			}
			System.out.println();

		}
	}

	public static class Scanner implements Closeable {
		private BufferedReader br;
		private StringTokenizer tok;

		public Scanner(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
		}

		private void getLine() {
			try {
				while (!hasNext()) {
					tok = new StringTokenizer(br.readLine());
				}
			} catch (IOException e) { /* ignore */
			}
		}

		private boolean hasNext() {
			return tok != null && tok.hasMoreTokens();
		}

		public String next() {
			getLine();
			return tok.nextToken();
		}

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

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

		public void close() {
			try {
				br.close();
			} catch (IOException e) { /* ignore */
			}
		}
	}
}

import java.io.*;
import java.util.StringTokenizer;

public class Main {

    static MyScanner in;
    static PrintWriter out;
    //static Timer t = new Timer();

    public static void main(String[] args) throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out, true);

        int n = in.nextInt();

        if (n <= 3) {
            out.println("1\n" + n);
            return;
        }

        int s1 = n - 2;
        while (!isPrime(s1))//
            s1--;

        int left = n - s1;
        for (int i = 1; i < left; i++)
            if (isPrime(i) && isPrime(left - i)) {
                out.println("3\n" + s1 + " " + i + " " + (left - i));
                return;
            }

        throw new IOException();
    }

    static boolean isPrime(int n) {
        int sqrt = (int) Math.sqrt(n) + 1;
        for (int i = 2; i < sqrt; i++)
            if (n % i == 0)
                return false;
        return true;
    }

}

class MyScanner {

    private final BufferedReader br;
    private StringTokenizer st;
    private String last;

    public MyScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    public MyScanner(String path) throws IOException {
        br = new BufferedReader(new FileReader(new File(path)));
        //br = new BufferedReader(new InputStreamReader(new FileInputStream(
        //new File(path)), "cp1251"));
    }

    String next() throws IOException {
        while (st == null || !st.hasMoreElements())
            st = new StringTokenizer(br.readLine());
        last = null;
        return st.nextToken();
    }

    String nextLine() throws IOException {
        st = null;
        return (last == null) ? br.readLine() : last;
    }

    boolean hasNext() {
        if (st != null && st.hasMoreElements())
            return true;

        try {
            while (st == null || !st.hasMoreElements()) {
                last = br.readLine();
                st = new StringTokenizer(last);
            }
        } catch (Exception e) {
            return false;
        }

        return true;
    }

    String[] nextStrings(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = next();
        return arr;
    }

    String[] nextLines(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLine();
        return arr;
    }

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

    int[] nextInts(int n) throws IOException {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    Integer[] nextIntegers(int n) throws IOException {
        Integer[] arr = new Integer[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    int[][] next2Ints(int n, int m) throws IOException {
        int[][] arr = new int[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextInt();
        return arr;
    }

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

    long[] nextLongs(int n) throws IOException {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLong();
        return arr;
    }

    long[][] next2Longs(int n, int m) throws IOException {
        long[][] arr = new long[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextLong();
        return arr;
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next().replace(',', '.'));
    }

    double[] nextDoubles(int size) throws IOException {
        double[] arr = new double[size];
        for (int i = 0; i < size; i++)
            arr[i] = nextDouble();
        return arr;
    }

    boolean nextBool() throws IOException {
        String s = next();
        if (s.equalsIgnoreCase("true") || s.equals("1"))
            return true;

        if (s.equalsIgnoreCase("false") || s.equals("0"))
            return false;

        throw new IOException("Boolean expected, String found!");
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;

public class NumberTheory {

	static long n;
	static HashSet<Long> h = new HashSet();
	static ArrayList<Integer> primes = new ArrayList();
	static boolean isPrime[] = new boolean[(int)(10e6+1)];
	static int N = (int)(10e6);
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	static long a;
	public static void sieve()
	{
		Arrays.fill(isPrime,true);

		for(long i = 2; i*i <= N ;i++)
		{
			if(isPrime[(int)i])
			{
				for(long j = i*2 ; j <= N; j+=i)
				{
					isPrime[(int)j] = false;
				}
			}
		}
		for(int i = 2 ; i <= N; i++) if(isPrime[i]){
			if((i&1)==1)primes.add(i);
			h.add((long)i);
		}

	}
	public static long nearestPrime(long n)
	{
		int lo = 0; int hi = primes.size() - 1;
		int ans = -1;
		while( lo <= hi)
		{
			int mid = lo+(hi-lo)/2;
			if(primes.get(mid) <= n)
			{
				lo = mid + 1;
				ans = mid;
			}
			else hi = mid - 1;
		}
		return primes.get(ans);
	}
	public static void main(String[]args)throws Throwable
	{
		a = new Long(br.readLine());
		long p1,p2,p3;
		sieve();

		if(h.contains(a))
		{
			System.out.println("1\n"+(a));
			return;
		}
		p1 = nearestPrime(a);
		long rem = a - nearestPrime(a);
		if(rem == 1)
		{
			p1 = nearestPrime(p1-1);
			rem = a - p1;

		}

		if(h.contains(rem))
		{
			System.out.println("2\n"+(p1)+" "+(rem));
			return ;

		}

		for(long x: h)
		{
			p2 = x;

			if(h.contains(rem-p2)){
				System.out.println("3\n"+(p1)+" "+(p2)+" "+(rem-p2));
				return;
			}
		}

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class DimaAndLisa {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(in.readLine());
		if(check(n)) {
			System.out.println(1);
			System.out.println(n);
		} else if(check(n-2)) {
			System.out.println(2);
			System.out.println(2 + " " + (n-2));
		} else {
			int y = n;
			while(!check(y)) {
				y--;
			}
			y = y /2;
			while(!check(y) && !check(n - 2*y)) {
				y--;
			}
			System.out.println(3);
			System.out.println((n - 2*y) + " " + y + " " + y);

		}
	}

	public static boolean check(int a) {
		boolean isPrime = true;
		for(int i = 2;i<=(int) Math.floor(Math.sqrt(a));i++){
			if(a % i == 0) {
				isPrime = false;
				break;
			}
		}
		return isPrime;
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Main {

    static Main.MyScanner sc = new Main.MyScanner();
    static PrintWriter out = new PrintWriter(System.out);

    // static PrintStream out = System.out;

    public static void main(String[] args) {
        for(int i = 0 ; i < 1000000000 ; i++){

        }
        int n = sc.nextInt(),arr[] = new int[n] ;
        ArrayList<Integer> al = new ArrayList<>() ;
        al.add(0);
        for(int i = 2 ; i < arr.length ; i++)if(arr[i] == 0){
            al.add(i);
            for(int j = i + i ; j < arr.length ; j += i){
                arr[j] = 1 ;
            }
        }
        boolean flag = false ;
        for(int i = 0 ; i < al.size() && !flag ; i++){
            for(int j = i ; j < al.size() && !flag ; j++){
                for(int k = j ; k < al.size() && !flag ; k++){
                    if(al.get(i)+al.get(j)+al.get(k) == n){
                        flag = true ;
                        if(i == 0 ){
                            if(j == 0){
                                out.println(1);
                                out.println(al.get(k));
                            }else {
                                out.println(2);
                                out.println(al.get(j)+" "+al.get(k));
                            }
                        }else {
                            out.println(3);
                            out.println(al.get(i)+" "+al.get(j)+" "+al.get(k));
                        }
                    }
                }
            }
        }
        out.close();
    }

    static boolean solve(int n,long k,long v){
        long ans = v,tempk = k ;
        while (v >= k){
            ans += v/k ;
            k = k * tempk ;
        }
        return ans >= n ;
    }

    static private class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public int mod(long x) {
            // TODO Auto-generated method stub
            return (int) x % 1000000007;
        }

        public int mod(int x) {
            return x % 1000000007;
        }

        boolean hasNext() {
            if (st.hasMoreElements())
                return true;
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
            return st.hasMoreTokens();
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

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

}

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.StringTokenizer;

public class D
{
	public static final Random RANDOM = new Random(System.currentTimeMillis());
	private BufferedReader bufferedReader;
	private StringTokenizer stringTokenizer;
	private PrintWriter out;

	public D()
	{
		this(new BufferedReader(new InputStreamReader(System.in)));
	}

	public D(BufferedReader bufferedReader)
	{
		this.bufferedReader = bufferedReader;
		this.stringTokenizer = null;
		this.out = new PrintWriter(new BufferedOutputStream(System.out));
	}

	public D(String file) throws FileNotFoundException
	{
		this(new BufferedReader(new InputStreamReader(new FileInputStream(file))));
	}

	private String next() throws IOException
	{
		while ((this.stringTokenizer == null) || (!this.stringTokenizer.hasMoreTokens()))
		{
			this.stringTokenizer = new StringTokenizer(this.bufferedReader.readLine());
		}
		return stringTokenizer.nextToken();
	}

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

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

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

	public String nextLine() throws IOException
	{
		return this.bufferedReader.readLine();
	}

	public void close()
	{
		out.close();
	}

	public static void main(String[] args)
	{
		D template = new D();
		try
		{
			template.solve();
		}
		catch (IOException exception)
		{
			exception.printStackTrace();
		}
		template.close();
	}

	public static int convert(int offset, boolean[] sieve, int[] primes, int primesCount)
	{
		for (int index = 0; index < sieve.length; index++)
		{
			if (sieve[index])
			{
				primes[primesCount] = offset + index;
				primesCount += 1;
			}
		}
		return primesCount;
	}

	public static boolean[] generateSieve(int size)
	{
		boolean[] result = new boolean[size];
		for (int index = 0; index < size; index++)
		{
			result[index] = true;
		}
		return result;
	}

	public static int[] generatePrimes(int n)
	{
		int[] primes = new int[(int) (n / Math.log(n) * 2)];
		int primesCount = 0;
		int segmentSize = (int) Math.sqrt(n);
		if (segmentSize * segmentSize < n)
		{
			segmentSize += 1;
		}
		int sqrt4 = (int) Math.sqrt(segmentSize);
		boolean[] sieve = generateSieve(segmentSize);
		sieve[0] = false;
		sieve[1] = false;
		for (int prime = 0; prime <= sqrt4; prime++)
		{
			if (sieve[prime])
			{
				for (int mul = 2; prime * mul < segmentSize; mul++)
				{
					sieve[prime * mul] = false;
				}
			}
		}
		primesCount = convert(0, sieve, primes, primesCount);
		int primesCountSieve = primesCount;
		for (int segment = 1; segment < segmentSize; segment++)
		{
			sieve = generateSieve(segmentSize);
			int offset = segmentSize * segment;
			for (int indexPrime = 0; indexPrime < primesCountSieve; indexPrime++)
			{
				int prime = primes[indexPrime];
				for (int mul = offset / prime; prime * mul - offset < segmentSize; mul++)
				{
					if (prime * mul - offset >= 0)
					{
						sieve[prime * mul - offset] = false;
					}
				}
			}
			primesCount = convert(offset, sieve, primes, primesCount);
		}
		int[] result = new int[primesCount];
		for (int index = 0; index < primesCount; index++)
		{
			result[index] = primes[index];
		}
		return result;
	}

	public static boolean isPrime(int[] primes, int n)
	{
		boolean result = true;
		for (int prime : primes)
		{
			result &= (n % prime != 0);
		}
		return result;
	}

	public int[] solve(int n)
	{
		int[] result;
		if (n == 2)
		{
			result = new int[]
			{ 2 };
		}
		else
		{
			if (n == 3)
			{
				result = new int[]
				{ 3 };
			}
			else
			{
				if (n == 4)
				{
					result = new int[]
					{ 2, 2 };
				}
				else
				{
					if (n == 5)
					{
						result = new int[]
						{ 5 };
					}
					else
					{
						if (n == 6)
						{
							result = new int[]
							{ 3, 3 };
						}
						else
						{
							result = new int[3];
							result[0] = 2;
							n = n - 2;
							int[] primes = generatePrimes((int) Math.sqrt(n) + 1);
							for (int prime : primes)
							{
								if (isPrime(primes, n - prime))
								{
									result[1] = prime;
									result[2] = n - prime;
								}
							}
						}
					}
				}
			}
		}
		return result;
	}

	public void solve() throws IOException
	{
		int n = nextInt();
		int[] primes = solve(n);
		for (int prime : primes)
		{
			out.println(prime);
		}
	}
}

import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		if(isPrime(n)){
			System.out.println(1);
			System.out.println(n);
			return;
		}
		int p1 = n - 2;
		while(!isPrime(p1)) p1--;

		int p2 = n - p1;
		if(isPrime(p2)){
			System.out.println(2);
			System.out.println(p1 + " " + p2);
			return;
		}

		p2 -= 2;
		int p3 = n - p1 - p2;
		while(!isPrime(p2) && !isPrime(p3)){
			p2--;
			p3++;
		}
		System.out.println(3);
		System.out.println(p1 + " " + p2 + " " + p3);
		return;
	}

	static boolean isPrime(int n){
		int len = (int)Math.sqrt(n);
		for(int i = 2; i <= len; i++){
			if(n % i == 0) return false;
		}
		return true;
	}
}

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.StringTokenizer;

public class D
{
	public static final Random RANDOM = new Random(System.currentTimeMillis());
	private BufferedReader bufferedReader;
	private StringTokenizer stringTokenizer;
	private PrintWriter out;

	public D()
	{
		this(new BufferedReader(new InputStreamReader(System.in)));
	}

	public D(BufferedReader bufferedReader)
	{
		this.bufferedReader = bufferedReader;
		this.stringTokenizer = null;
		this.out = new PrintWriter(new BufferedOutputStream(System.out));
	}

	public D(String file) throws FileNotFoundException
	{
		this(new BufferedReader(new InputStreamReader(new FileInputStream(file))));
	}

	private String next() throws IOException
	{
		while ((this.stringTokenizer == null) || (!this.stringTokenizer.hasMoreTokens()))
		{
			this.stringTokenizer = new StringTokenizer(this.bufferedReader.readLine());
		}
		return stringTokenizer.nextToken();
	}

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

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

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

	public String nextLine() throws IOException
	{
		return this.bufferedReader.readLine();
	}

	public void close()
	{
		out.close();
	}

	public static void main(String[] args)
	{
		D template = new D();
		try
		{
			template.solve();
		}
		catch (IOException exception)
		{
			exception.printStackTrace();
		}
		template.close();
	}

	public static int convert(int offset, boolean[] sieve, int[] primes, int primesCount)
	{
		for (int index = 0; index < sieve.length; index++)
		{
			if (sieve[index])
			{
				primes[primesCount] = offset + index;
				primesCount += 1;
			}
		}
		return primesCount;
	}

	public static boolean[] generateSieve(int size)
	{
		boolean[] result = new boolean[size];
		for (int index = 0; index < size; index++)
		{
			result[index] = true;
		}
		return result;
	}

	public static int[] generatePrimes(int n)
	{
		int[] primes = new int[(int) (n / Math.log(n) * 2)];
		int primesCount = 0;
		int segmentSize = (int) Math.sqrt(n);
		if (segmentSize * segmentSize < n)
		{
			segmentSize += 1;
		}
		int sqrt4 = (int) Math.sqrt(segmentSize);
		boolean[] sieve = generateSieve(segmentSize);
		sieve[0] = false;
		sieve[1] = false;
		for (int prime = 0; prime <= sqrt4; prime++)
		{
			if (sieve[prime])
			{
				for (int mul = 2; prime * mul < segmentSize; mul++)
				{
					sieve[prime * mul] = false;
				}
			}
		}
		primesCount = convert(0, sieve, primes, primesCount);
		int primesCountSieve = primesCount;
		for (int segment = 1; segment < segmentSize; segment++)
		{
			sieve = generateSieve(segmentSize);
			int offset = segmentSize * segment;
			for (int indexPrime = 0; indexPrime < primesCountSieve; indexPrime++)
			{
				int prime = primes[indexPrime];
				for (int mul = offset / prime; prime * mul - offset < segmentSize; mul++)
				{
					if (prime * mul - offset >= 0)
					{
						sieve[prime * mul - offset] = false;
					}
				}
			}
			primesCount = convert(offset, sieve, primes, primesCount);
		}
		int[] result = new int[primesCount];
		for (int index = 0; index < primesCount; index++)
		{
			result[index] = primes[index];
		}
		return result;
	}

	public static boolean isPrime(int[] primes, int n)
	{
		boolean result = true;
		for (int prime : primes)
		{
			result &= (n % prime != 0);
		}
		return result;
	}

	public int[] solve(int n)
	{
		int[] result;
		if (n == 2)
		{
			result = new int[]
			{ 2 };
		}
		else
		{
			if (n == 3)
			{
				result = new int[]
				{ 3 };
			}
			else
			{
				if (n == 4)
				{
					result = new int[]
					{ 2, 2 };
				}
				else
				{
					if (n == 5)
					{
						result = new int[]
						{ 5 };
					}
					else
					{
						if (n == 6)
						{
							result = new int[]
							{ 3, 3 };
						}
						else
						{
							result = new int[3];
							result[0] = 2;
							n = n - 2;
							int[] primes = generatePrimes((int) Math.sqrt(n) + 1);
							for (int prime : primes)
							{
								if (isPrime(primes, n - prime))
								{
									result[1] = prime;
									result[2] = n - prime;
								}
							}
						}
					}
				}
			}
		}
		return result;
	}

	public void solve() throws IOException
	{
		int n = nextInt();
		int[] primes = solve(n);
		for (int prime : primes)
		{
			out.print(prime + " ");
		}
		out.println();
	}
}

import java.io.*;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;

/**
 * Created by WiNDWAY on 4/18/16.
 */

public class Codeforces_round_324_div_2_DimaAndLisa {

    public static HashSet<Integer> set = new HashSet<>();
    public static void main(String[] args) {
        FScanner input = new FScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out), true);
        int n = input.nextInt();
        sieve(n / 2);
        for(int x : set) {
            for(int y : set) {
                if(y == n) {
                    out.println(1);
                    out.println(y);
                    System.exit(0);
                }
                if((x + y) == n) {
                    out.println(2);
                    out.println(x + " " + y);
                    System.exit(0);
                }
                int remain = n - x - y;
                if(set.contains(remain)) {
                    out.println(3);
                    out.println(remain + " " + x + " " + y);
                    System.exit(0);
                }

            }
        }
        out.close();
    }

    public static void sieve(int n) {
        boolean prime[] = new boolean[n + 1];
        Arrays.fill(prime, true);

        for (int p = 2; p * p <= n; p++) {
            if (prime[p]) {
                for (int i = p * 2; i <= n; i += p) {
                    prime[i] = false;
                }
            }
        }

        for (int p = 2; p <= n; p++) {
            if (prime[p]) {
                set.add(p);
            }
        }
    }

    public static PrintWriter out;

    public static class FScanner {
        BufferedReader br;
        StringTokenizer st;

        public FScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class ProblemD {
    private static List<Integer> primes = new ArrayList<Integer>();

    public static void main(String[] args) {
        InputReader in = new InputReader();
        PrintWriter out = new PrintWriter(System.out);

        new ProblemD().solve(in, out);

        out.close();
    }

    public void solve(InputReader in, PrintWriter out) {
        int n = in.nextInt();

        if (n == 3) {
            out.println(1);
            out.print(3);
        }

        if (n == 5) {
            out.println(1);
            out.print(5);
        }

        int k = (n + 1) / 2;

        for (int i = 3; i <= k; i++) {
            if (isPrime(i)) {
                int t = (n - i) / 2;

                if (isPrime(t)) {
                    out.println(3);
                    out.print(i + " " + t + " " + t);
                    return;
                }
            }
        }
    }

    public static boolean isPrime(int n) {
        if (primes.contains(n)) {
            return true;
        }

        if (n == 2) {
            return true;
        }

        if (n <= 1 || n % 2 == 0) {
            return false;
        }

        for (int i = 3; i * i <= n; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }

        primes.add(n);

        return true;
    }

    static class InputReader {
        public BufferedReader br;
        public StringTokenizer st;

        public InputReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

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

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.io.*;
import java.util.StringTokenizer;

public class Main {

    static MyScanner in;
    static PrintWriter out;
    //static Timer t = new Timer();

    public static void main(String[] args) throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out, true);

        int n = in.nextInt();

        if (n <= 3) {
            out.println("1\n" + n);
            return;
        }

        int s1 = n - 2;
        while (!isPrime(s1))
            s1--;

        out.println(s1);

        int left = n - s1;
        for (int i = 1; i < left; i++)
            if (isPrime(i) && isPrime(left - i)) {
                out.println("3\n" + s1 + " " + i + " " + (left - i));
                return;
            }

        throw new IOException();
    }

    static boolean isPrime(int n) {
        int sqrt = (int) Math.sqrt(n) + 1;
        for (int i = 2; i < sqrt; i++)
            if (n % i == 0)
                return false;
        return true;
    }

}

class MyScanner {

    private final BufferedReader br;
    private StringTokenizer st;
    private String last;

    public MyScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    public MyScanner(String path) throws IOException {
        br = new BufferedReader(new FileReader(new File(path)));
        //br = new BufferedReader(new InputStreamReader(new FileInputStream(
        //new File(path)), "cp1251"));
    }

    String next() throws IOException {
        while (st == null || !st.hasMoreElements())
            st = new StringTokenizer(br.readLine());
        last = null;
        return st.nextToken();
    }

    String nextLine() throws IOException {
        st = null;
        return (last == null) ? br.readLine() : last;
    }

    boolean hasNext() {
        if (st != null && st.hasMoreElements())
            return true;

        try {
            while (st == null || !st.hasMoreElements()) {
                last = br.readLine();
                st = new StringTokenizer(last);
            }
        } catch (Exception e) {
            return false;
        }

        return true;
    }

    String[] nextStrings(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = next();
        return arr;
    }

    String[] nextLines(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLine();
        return arr;
    }

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

    int[] nextInts(int n) throws IOException {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    Integer[] nextIntegers(int n) throws IOException {
        Integer[] arr = new Integer[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    int[][] next2Ints(int n, int m) throws IOException {
        int[][] arr = new int[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextInt();
        return arr;
    }

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

    long[] nextLongs(int n) throws IOException {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLong();
        return arr;
    }

    long[][] next2Longs(int n, int m) throws IOException {
        long[][] arr = new long[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextLong();
        return arr;
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next().replace(',', '.'));
    }

    double[] nextDoubles(int size) throws IOException {
        double[] arr = new double[size];
        for (int i = 0; i < size; i++)
            arr[i] = nextDouble();
        return arr;
    }

    boolean nextBool() throws IOException {
        String s = next();
        if (s.equalsIgnoreCase("true") || s.equals("1"))
            return true;

        if (s.equalsIgnoreCase("false") || s.equals("0"))
            return false;

        throw new IOException("Boolean expected, String found!");
    }
}

import java.util.Scanner;

public class DD {
public static void main(String[] args) {
	 Scanner sc=new  Scanner(System.in);
	 int n=sc.nextInt();
	 boolean []used=new boolean[100001];
	 	for (int i =2; i <=316; i++) {
			if(!used[i]){
				for (int j =2; j <=100000/i; j++) {
					used[i*j]=true;
				}
			}
		}
	 	int k=n;
	 	while(true){
	 	while(tubmi(k)){
	 		k--;
	 	}
	 	if(k==n){
	 		System.out.println("1");
	 		System.out.println(k);
	 		return;
	 	}else{
	 		if(!tubmi(k-2)){
	 			System.out.println("2");
	 			System.out.println(k-2+" "+"2");
	 			return;
	 		}else{

	 			int h=n-k;
	 			for (int i =2; i <=h; i++) {
					if(!used[i]&&!used[Math.abs(i-h)]){
						System.out.println("3");
			 			System.out.print(k+" ");
						System.out.print(i+" "+Math.abs(i-h));return;
					}
				}
	 		}
	 	}
	 	}
}

private static boolean tubmi(int k) {
		for (int i =2; i <=Math.sqrt(k); i++) {
			if(k%i==0)return true;
		}
	return false;
}
}

import java.util.*;
import java.io.*;

public class Solution{
	static PrintWriter out=new PrintWriter(System.out);
	public static void main (String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

		String[] temp=br.readLine().trim().split(" ");

		int n=Integer.parseInt(temp[0]);
		printNumbers(n);

		out.flush();
		out.close();
	}
	public static void printNumbers(int n)
	{
	    int remaining=n-3;
	    ArrayList<Integer> ans=new ArrayList<>();
	    ans.add(3);
	    for(int i=2;i<n;i++){
	        if(isPrime(i)){
	            if(remaining-i==0){
	                ans.add(i);
	                break;
	            }
	            else if(isPrime(remaining-i)){
	                ans.add(i);
	                ans.add(remaining-i);
	                break;
	            }
	        }
	    }

	    out.println(ans.size());
	    for(int i=0;i<ans.size();i++){
	        out.print(ans.get(i)+" ");
	    }
	    out.println();
	}
	public static boolean isPrime(int x){
	    for(int i=2;i<=Math.sqrt(x);i++){
	        if(x%i==0){
	            return false;
	        }
	    }
	    return true;
	}
}

import java.io.*;
import java.util.*;
import java.math.*;

public class Main {

    FastScanner in;
    PrintWriter out;

    static class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
            st = null;
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        String nextLine() throws IOException {
            if (st == null || !st.hasMoreTokens())
                return br.readLine();
            StringBuilder result = new StringBuilder(st.nextToken());
            while (st.hasMoreTokens()) {
                result.append(" ");
                result.append(st.nextToken());
            }
            return result.toString();
        }

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

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

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

    }

    void run() throws IOException {
        in = new FastScanner(System.in);
        out = new PrintWriter(System.out, false);
        solve();
        out.close();
    }

    public static void main(String[] args) throws IOException{
        new Main().run();
    }

    public void printArr(int[] arr){
        for(int i = 0; i < arr.length; i++){
            out.print(arr[i] + " ");
        }
        out.println();
    }

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

    public boolean isPrime(long num){

        if(num == 0 || num == 1){
            return false;
        }

        for(int i = 2; i * i <= num; i++){
            if(num % i == 0){
                return false;
            }
        }

        return true;
    }

    public void solve() throws IOException{

        int n = in.nextInt();

        if(isPrime(n)){
            out.println(1);
            out.println(n);
            return;
        }

        int p0 = -1, p1 = -1, p2 = -1;
        for(int i = n - 2; i >= 0; i--){
            if(isPrime(i)){
                p0 = i;
                break;
            }
        }

        for(int i = 2; i <= n - p0; i++){
            if(isPrime(i) && isPrime(n - p0 - i)){
                p1 = i;
                p2 = n - p0 - i;
            }
        }

        out.println(3);
        out.println(p0 + " " + p1 + " " + p2);
        return;
    }

}

import java.io.*;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;

/**
 * Created by WiNDWAY on 4/18/16.
 */

public class Codeforces_round_324_div_2_DimaAndLisa {

    public static HashSet<Integer> set = new HashSet<>();
    public static void main(String[] args) {
        FScanner input = new FScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out), true);
        int n = input.nextInt();
        if(isPrime(n)) {
            out.println(1);
            out.println(n);
            System.exit(0);
        }
        sieve(n / 2);
        for(int x : set) {
            int remain = n - x;
            if(set.contains(remain / 2)) {
                out.println(3);
                out.println(remain + " " + remain + " " + x);
                System.exit(0);
            }
        }
        out.close();
    }

    public static boolean isPrime(int n) {
        if (n <= 1) {
            return false;
        }
        if (n <= 3) {
            return true;
        }

        if (n % 2 == 0 || n % 3 == 0) {
            return false;
        }

        for (int i = 5; i * i <= n; i = i + 6) {
            if (n % i == 0 || n % (i + 2) == 0) {
                return false;
            }
        }
        return true;
    }

    public static void sieve(int n) {
        boolean prime[] = new boolean[n + 1];
        Arrays.fill(prime, true);

        for (int p = 2; p * p <= n; p++) {
            if (prime[p]) {
                for (int i = p * 2; i <= n; i += p) {
                    prime[i] = false;
                }
            }
        }

        for (int p = 2; p <= n; p++) {
            if (prime[p]) {
                set.add(p);
            }
        }
    }

    public static PrintWriter out;

    public static class FScanner {
        BufferedReader br;
        StringTokenizer st;

        public FScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}

import java.util.*;
import java.io.*;
import java.math.*;

public class D {
	static ArrayList<Integer> primes = new ArrayList<Integer>();

	static void sieve() {
		boolean[] p = new boolean[1000000];
		for (long i=2; i<1000000; i++) {
			if (p[(int)i]) continue;
			primes.add((int)i);
			for (long j=i*i; j<1000000; j+=i) {
				p[(int)j] = true;
			}
		}
	}

	public static void main(String[] args) throws Exception {
		sieve();
		Scanner sc = new Scanner(System.in);
		BigInteger n = sc.nextBigInteger();
		if (n.isProbablePrime(12)) {
			System.out.println(1);
			System.out.println(n.toString());
			return;
		}
		if (n.subtract(BigInteger.valueOf(2)).isProbablePrime(12)) {
			System.out.println(2);
			System.out.println("2 " + n.subtract(BigInteger.valueOf(2)).toString());
			return;
		}
		for (int i=0; i<primes.size(); i++) {
			BigInteger x = n.subtract(BigInteger.valueOf(primes.get(i)));
			x = x.divide(BigInteger.valueOf(2));
			if (x.isProbablePrime(12)) {
				System.out.println(3);
				System.out.printf("%d %s %s\n", primes.get(i), x.toString(), x.toString());
				return;
			}
		}
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.NavigableMap;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

public class d324 {

	static class Task {

		public void Solve(InputReader in, PrintWriter out)
		{
			int N=in.nextInt();
			int n=N;
			n-=3;
			ArrayList<Integer> primes=new ArrayList<>();
			primes.add(3);
			boolean sieve[]=new boolean[10000001];
			SieveOfErathostenes(10000000, sieve);
			for(int i=min(n-2,sieve.length-1);i>=2;i--)
			{
				if(!sieve[i])
				{
					primes.add(i);
					n-=i;
					break;
				}
			}
			primes.add(n);
			if(N>=7)
			{
				out.println("3");
			    for(int i:primes)
				    out.print(i+" ");
			}
			else if(N==3)
			{

					out.println("1");
				    out.print("3");
			}
			else if(N==5)
			{
				out.println("1");
			    out.print("5");
			}
		}

     }

	static boolean prime(int n)
	{
		if(n%2==0)
		{
			return false;
		}
		for(int i=3;i<=Math.sqrt(n);i+=2)
		{
			if(n%i==0)
				return false;
		}
		return true;
	}

	public static void SieveOfErathostenes(int n,boolean sieve[]){
  		int cnt = 0;
  		for(int i = 2 ; i <= n ; i++)
  			if(sieve[i] == false){
  			    cnt++;
  				for(int j = i + i ; j <= n ; j += i)
  					sieve[j] = true;
  			}
  	}

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.Solve(in,out);
        out.close();
    }

    static int[][] sort2D(int arr[][]){
        Arrays.sort(arr,new java.util.Comparator<int[]>(){
        public int compare(int[] a, int[] b) {
            return Integer.compare(a[0], b[0]);
        }});
        return arr;
    }

	static int[] di={1,0,-1,0,1,-1,-1,1};
	static int[] dj={0,1,0,-1,1,1,-1,-1};

	static class point{
		int x;int y;
		public point(int x,int y){
			this.x=x;
			this.y=y;
		}
	}

    static void sort(int arr[]){
		int cnt[]=new int[(1<<16)+1];
		int ys[]=new int[arr.length];
		for(int j=0;j<=16;j+=16){
			Arrays.fill(cnt,0);
			for(int x:arr){cnt[(x>>j&0xFFFF)+1]++;}
			for(int i=1;i<cnt.length;i++){cnt[i]+=cnt[i-1];}
			for(int x:arr){ys[cnt[x>>j&0xFFFF]++]=x;}
			{ final int t[]=arr;arr=ys;ys=t;}
		}
		if(arr[0]<0||arr[arr.length-1]>=0)return;
		int i,j,c;
		for(i=arr.length-1,c=0;arr[i]<0;i--,c++){ys[c]=arr[i];}
		for(j=arr.length-1;i>=0;i--,j--){arr[j]=arr[i];}
		for(i=c-1;i>=0;i--){arr[i]=ys[c-1-i];}
	}

    static int abs(int x){if(x>=0)return x;else return -x;}
    static int gcd(int a,int b){return b==0?a:gcd(b,a%b);}
    static int min(int x,int y){return x<y?x:y;}
    static int min(int x,int y,int z){return x<y?(x<z?x:z):(y<z?y:z);}
    static int max(int x,int y){return x>y?x:y;}
    static int max(int x,int y,int z){return x>y?(x>z?x:z):(y>z?y:z);}

    static void joutArray(int arr[]){
    	for(int i=0;i<arr.length;i++){
    		System.out.print(arr[i]+" ");
    	}
    	System.out.println();
    }

    static void joutArray(int arr[][],int n,int m){
    	for(int i=0;i<n;i++){
    		for(int j=0;j<m;j++)
    		System.out.print(arr[i][j]+" ");
    		System.out.println();
    	}
    	System.out.println();
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() {
			String fullLine=null;
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					fullLine=reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				return fullLine;
			}
			return fullLine;
		}

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

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

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

        public int[] nextIntArray(int n) {
        	int arr[]=new int[n];
        	for(int i=0;i<n;i++)
        		arr[i]=nextInt();
        	return arr;
        }

        public char[] nextCharArray(){
        	char arr[]=next().toCharArray();
        	return arr;
        }

        public HashMap<Integer,Integer> inHashMap(int n){
        	HashMap<Integer,Integer> hm=new HashMap<>();
        	for(int i=0;i<n;i++){
    			int num=nextInt();
    			hm.put(num,hm.get(num)==null?1:hm.get(num)+1);
    		}
        	return hm;
        }
     }

   }

import java.util.*;

public class D {
	static HashSet<Integer> primeSet = new HashSet<>();
	static ArrayList<Integer> primes;

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		if (n == 3 || n == 5) {
			System.out.println(1);
			System.out.println(n);
			return;
		}
		int cand = 0;
		primes = generatePrimes(40000);
		n -= 3;
		for (int p : primes) {
			if (checkPrime(n - p)) {
				cand = p;
				break;
			}
		}
		System.out.println(3);
		System.out.println("3 " + cand + " " + (n-cand));
	}

	private static boolean checkPrime(int n) {
		for (int p: primes) {
			if (n % p == 0) return false;
			if (p > (int) Math.sqrt(n)) break;
		}
		return true;
	}

	static ArrayList<Integer> generatePrimes(int limit) {
	    final int numPrimes = countPrimesUpperBound(limit);
	    ArrayList<Integer> primes = new ArrayList<Integer>(numPrimes);
	    boolean [] isComposite    = new boolean [limit];   // all false
	    final int sqrtLimit       = (int)Math.sqrt(limit); // floor
	    for (int i = 2; i <= sqrtLimit; i++) {
	        if (!isComposite [i]) {
	            primes.add(i);
	            primeSet.add(i);
	            for (int j = i*i; j < limit; j += i) // `j+=i` can overflow
	                isComposite [j] = true;
	        }
	    }
	    for (int i = sqrtLimit + 1; i < limit; i++)
	        if (!isComposite [i]) {
	            primes.add(i);
	            primeSet.add(i);
	        }
	    return primes;
	}

	static int countPrimesUpperBound(int max) {
	    return max > 1 ? (int)(1.25506 * max / Math.log((double)max)) : 0;
	}
}

import java.util.*;

public class Main {
  Scanner sc;

  void run() {
    long n = ni();
    {
      long d = n;
      boolean f = true;
      for ( int i = 3; i * i <= d; ++i ) {
        f &= d % i != 0;
      }
      if ( f ) {
        System.out.println(1);
        System.out.println(d);
        return;
      }
    }
    {
      long d = n - 2;
      boolean f = true;
      for ( int i = 3; i * i <= d; ++i ) {
        f &= d % i != 0;
      }
      if ( f ) {
        System.out.println(2);
        System.out.println(2 + " " + d);
        return;
      }
    }
    {
      for ( long d = n-2; ; --d) {
        boolean f = true;
        for ( int i = 3; i * i <= d; ++i ) {
          f &= d % i != 0;
        }
        if (f) {
          long e = n - d;
          e /= 2;
          boolean g = true;
          for ( int i = 3; i * i <= e; ++i ) {
            g &= e % i != 0;
          }
          if (g) {
            System.out.println(3);
            System.out.printf(e + " " + e + " " + d);
            return;
          }
        }
      }
    }
  }

  Main() {
    sc = new Scanner(System.in);
  }

  int ni() {
    return sc.nextInt();
  }

  public static void main(String[] args) {
    new Main().run();
  }

  void debug(Object... os) {
    System.err.println(Arrays.deepToString(os));
  }
}

//package CodeForces.Round324;

import java.util.*;
import java.util.stream.LongStream;
import java.util.stream.Stream;

/**
 * Created by Ilya Sergeev on 09.10.2015.
 */
public class EDimaLiza {
/*
    public static boolean[] fillSieve(int n){
        boolean[] primes=new boolean[n+1];
        Arrays.fill(primes, true);
        primes[0] = primes[1] = false;
        for (int i = 2; i < primes.length; i++) {
            if (primes[i]) {
                for (int j=2;i*j<primes.length;j++) {
                    primes[i*j]=false;
                }
            }
        }
        return primes;
    }

    public static LinkedList<Integer> count(List<Integer> primes, int n){
        LinkedList<Integer> list = new LinkedList<>();
        int[] ost = new int[n];
        if(primes.contains(n)){
            list.push(n);
            return list;
        }
        for (int i = 0; i < ost.length; i++) {
            ost[i] = -1;
        }
        for (int i = 0; i < primes.size(); i++) {
            if(n == primes.get(i)*3){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(primes.get(i));
                return list;
            }
            ost[n - primes.get(i)] = primes.get(i);
        }
        for (int i = 0; i < primes.size(); i++) {
            int c = primes.get(i)*2;
            if(n > c && ost[c] != -1){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(ost[c]);
                return list;
            }
        }
        return null;
    }
*/
    public static boolean isPrime(long number){
        return number > 1 &&
                LongStream.range(2, (long) Math.sqrt(number)+1)
                          .noneMatch(i -> number % i == 0);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        List<Long> list = new LinkedList<>();
        if(n > 300){
            long p = n - 300;
            Optional<Long> t = Stream.iterate(n-1, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(300)
                    .findAny();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i < n - list.get(0); i++) {
                    if(isPrime(i)){
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() > 1){
                    System.out.println(list.size());
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
        else{
            Optional<Long> t = Stream.iterate(n, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(n)
                    .findFirst();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i < n - list.get(0); i++) {
                    if(isPrime(i)){
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() >= 1){
                    System.out.println(list.size());
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
    }
}

//package CodeForces.Round324;

import java.util.*;
import java.util.stream.LongStream;
import java.util.stream.Stream;

/**
 * Created by Ilya Sergeev on 09.10.2015.
 */
public class EDimaLiza {
/*
    public static boolean[] fillSieve(int n){
        boolean[] primes=new boolean[n+1];
        Arrays.fill(primes, true);
        primes[0] = primes[1] = false;
        for (int i = 2; i < primes.length; i++) {
            if (primes[i]) {
                for (int j=2;i*j<primes.length;j++) {
                    primes[i*j]=false;
                }
            }
        }
        return primes;
    }

    public static LinkedList<Integer> count(List<Integer> primes, int n){
        LinkedList<Integer> list = new LinkedList<>();
        int[] ost = new int[n];
        if(primes.contains(n)){
            list.push(n);
            return list;
        }
        for (int i = 0; i < ost.length; i++) {
            ost[i] = -1;
        }
        for (int i = 0; i < primes.size(); i++) {
            if(n == primes.get(i)*3){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(primes.get(i));
                return list;
            }
            ost[n - primes.get(i)] = primes.get(i);
        }
        for (int i = 0; i < primes.size(); i++) {
            int c = primes.get(i)*2;
            if(n > c && ost[c] != -1){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(ost[c]);
                return list;
            }
        }
        return null;
    }
*/
    public static boolean isPrime(long number){
        return number > 1 &&
                LongStream.range(2, (long) Math.sqrt(number)+1)
                          .noneMatch(i -> number % i == 0);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        List<Long> list = new LinkedList<>();
        if(n > 300){
            long p = n - 300;
            Optional<Long> t = Stream.iterate(n-1, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(300)
                    .findAny();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i < n - list.get(0); i++) {
                    if(isPrime(i)){
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() > 1){
                    System.out.println(list.size());
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
        else{
            Optional<Long> t = Stream.iterate(n, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(n)
                    .findFirst();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i < n - list.get(0); i++) {
                    if(isPrime(i)){
                        if(i ==  n - list.get(0)){
                            list.add((long) i);
                            break outer;
                        }
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() >= 1){
                    System.out.println(list.size());
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
    }
}

import java.io.*;
import java.util.*;

@SuppressWarnings("unused")
public class A {
	public  static  FastScannerA scan = new FastScannerA();
	public static PrintWriter out = new PrintWriter(System.out);
	static long mad=(long) Math.pow(10, 9)+7;
	static boolean isPrime(int x) {
		if(x==1) return false;
		for(int i=2;i*i<=x;i++) {
			if(x%i==0) {
				return false;
			}
		}
		return true;
	}

	public static void solve () {
		int n=scan.nextInt();
		int rem=0;
		for(int i=n;i>1;i-=2) {
			if(isPrime(i)) {
				rem=n-i;
				break;
			}
		}
		if(rem==0) {
			out.println(1+"\n"+n);
			return;
		}
		if(isPrime(rem)) {
			out.println(2+"\n"+(n-rem)+" "+rem);
			return;
		}
		for(int i=2;i<=rem-2;i++) {
			if(isPrime(i) && isPrime(rem-i));
			out.println(3+"\n"+(n-rem)+" "+(rem-i)+" "+ i);
			return;
		}
	}
	public static void main(String[] args) {

		solve();
		out.close();
	}

}
class FastScannerA {
	BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st= new StringTokenizer("");
	String next() {
		while (!st.hasMoreTokens())
			try {
				st=new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		return st.nextToken();
	}
	int nextInt() {
		return Integer.parseInt(next());
	}
	int[] readArray(int n) {
		int[] a=new int[n];
		for (int i=0; i<n; i++) a[i]=nextInt();
		return a;
	}
	long nextLong() {
		return Long.parseLong(next());
	}
	void sort(long[] a) {
		ArrayList<Long> l=new ArrayList<>();
		for (long i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

}

import java.util.Scanner;

public class Main
{
    private static boolean isPrime(int x)
    {
        double d = Math.sqrt((double) x);
        int s = (int) d;
        for (int i = 2; i <= s; i++)
        {
            if (x % i == 0)
            {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        int n = Integer.parseInt(s1);
        int a = 0, b = 0;
        int k = 0;
        int res = 0;
        if (isPrime(n))
        {
            res = n;
            k = 1;
            System.out.println(k);
            System.out.println(res);
            return;
        }
        if (n == 4)
        {
            System.out.println(2);
            System.out.println(2 + " " + 2);
            return;
        }
        if (n == 6)
        {
            System.out.println(2);
            System.out.println(3 + " " + 3);
            return;
        }
        int t = n - 5;
        double d = Math.sqrt((double) t);
        int s = (int) d;

        for (int i = 2; i <= s; i++)
        {
            if (isPrime(i) && isPrime(t - i))
            {
                a = i;
                b = t - i;
                System.out.println(3);
                System.out.println(5 + " " + a + " " + b);
                return;
            }
        }

    }
}
// if (isPrime(n))
// {
// res = n;
// k = 1;
// System.out.println(k);
// System.out.println(res);
// return;
// }
//
// if (a == 0 && b == 0)
// {
// int x = n - 5;
// for (int i = 2; i <= x / 2; i++)
// {
// if (isPrime(i) && isPrime(x - i))
// {
// a = i;
// b = x - i;
// }
// }
// System.out.println(3);
// System.out.println(5 + " " + a + " " + b);
// return;
// }
// if (res == 0)
// {
// for (int i = 2; i <= n / 2; i++)
// {
// if (isPrime(i) && isPrime(n - i))
// {
// a = i;
// b = n - i;
// }
// }
// System.out.println(2);
// System.out.println(a + " " + b);
// return;
// }

import java.io.*;
import java.util.*;
public class dimaandliA {
    public static void main(String[] args) throws Exception
    {
        InputReader in=new InputReader(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=in.nextInt();
        if(isPrime(n))
        {
            pw.println(1);
            pw.println(n);
        }
        else if(isPrime(n-2))
        {
            pw.println(2);
            pw.println(n-2+" "+2);
        }
        for(int i=3;;i+=2)
        {
            if(isPrime(i) && isPrime(n-i-3))
            {
                pw.println(2);
                pw.println(i+" "+(n-i)+" "+3);
                break;

            }
        }

        pw.close();

    }

    public  static boolean isPrime(int num) {
        if (num == 2 ) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
        return true;
}

     static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }

            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class cf584d implements Runnable {
	public static final String taskname = cf584d.class.getName();

	public StringTokenizer strtok;
	public BufferedReader inr;
	public PrintWriter out;

	public static void main(String[] args) {
		new Thread(new cf584d()).start();
	}

	public void run() {
		Locale.setDefault(Locale.US);
		boolean oj = System.getProperty("ONLINE_JUDGE") != null;
		try {
			inr = new BufferedReader(oj ? new InputStreamReader(System.in, "ISO-8859-1") : new FileReader(taskname + ".in"));
			out = new PrintWriter(oj ? new OutputStreamWriter(System.out, "ISO-8859-1") : new FileWriter(taskname + ".out"));
			solve();
		} catch (Exception e) {
			if (!oj)
				e.printStackTrace();
			System.exit(9000);
		} finally {
			out.flush();
			out.close();
		}
	}

	public String nextToken() throws IOException {
		while (strtok == null || !strtok.hasMoreTokens()) {
			strtok = new StringTokenizer(inr.readLine());
		}
		return strtok.nextToken();
	}

	public int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	// Solution

	boolean isPrime(int i) {
		for (int d = 2; d <= Math.sqrt(i) + 1; d++) {
			if (i % d == 0) {
				return false;
			}
		}
		return true;
	}

	public void solve() throws NumberFormatException, IOException {
		ArrayList<Integer> primes = new ArrayList<Integer>();
		primes.add(2);
		for (int i = 2; i < 5000; i++) {
			if (isPrime(i)) {
				primes.add(i);
			}
		}

		HashSet<Integer> pregen = new HashSet<Integer>(primes);
		for (int i : primes) {
			for (int j : primes) {
				pregen.add(i + j);
			}
		}

		int n =  nextInt();
		if (Collections.binarySearch(primes, n - 4) >= 0) {
			out.printf("3\n2 2 %d", n - 4);
			return;
		}

		if ((new BigInteger(((Integer)(n)).toString())).isProbablePrime(15)) {
			out.printf("1\n%d", n);
			return;
		}

		for (int v : pregen) {
			BigInteger nnn = new BigInteger(((Integer)(n - v)).toString());
			if (nnn.isProbablePrime(15)) {
				// reconstructing
				if (Collections.binarySearch(primes, v) >= 0) {
					out.printf("2\n%d %d", v, n - v);
				}
				else {
					for (int vv : primes) {
						if (Collections.binarySearch(primes, v - vv) >= 0) {
							out.printf("3\n%d %d %d", vv, v - vv, n - v);
						}
					}
				}
			}

		}
	}
}

import java.io.*;
import java.util.*;

@SuppressWarnings("unused")
public class A {
	public  static  FastScannerA scan = new FastScannerA();
	public static PrintWriter out = new PrintWriter(System.out);
	static long mad=(long) Math.pow(10, 9)+7;
	static boolean isPrime(int x) {
		if(x==1) return false;
		for(int i=2;i*i<=x;i++) {
			if(x%i==0) {
				return false;
			}
		}
		return true;
	}

	public static void solve () {
		int n=scan.nextInt();
		int rem=0;
		for(int i=n;i>1;i-=2) {
			if(isPrime(i)) {
				rem=n-i;
				break;
			}
		}
		if(rem==0) {
			out.println(1+"\n"+n);
			return;
		}
		if(isPrime(rem)) {
			out.println(2+"\n"+(n-rem)+" "+rem);
			return;
		}
		for(int i=2;i<=rem-2;i++) {
			if(isPrime(i) && isPrime(rem-i));
			out.println(3+"\n"+(n-rem)+" "+(rem-i)+" "+ i);
		}
	}
	public static void main(String[] args) {

		solve();
		out.close();
	}

}
class FastScannerA {
	BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st= new StringTokenizer("");
	String next() {
		while (!st.hasMoreTokens())
			try {
				st=new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		return st.nextToken();
	}
	int nextInt() {
		return Integer.parseInt(next());
	}
	int[] readArray(int n) {
		int[] a=new int[n];
		for (int i=0; i<n; i++) a[i]=nextInt();
		return a;
	}
	long nextLong() {
		return Long.parseLong(next());
	}
	void sort(long[] a) {
		ArrayList<Long> l=new ArrayList<>();
		for (long i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

}

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Created by rbt1 on 06.10.2015.
 */
public class Codeforces324C {
    static boolean[] allPrimes (int n) {
        boolean[] primes =new boolean[n];
            Arrays.fill(primes, true);
            primes[0]=primes[1]=false;
            for (int i=2;i<primes.length;i++) {
                if(primes[i]) {
                    for (int j=2;i*j<primes.length;j++) {
                        primes[i*j]=false;
                }
            }
        }
        return primes;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        boolean[] primes = allPrimes(n+1);
        ArrayList<Integer> sum = new ArrayList<>();
        if (primes[n]) {
            System.out.println(n);
            return;
        }
       for (int i=n-1;i>=0;i--) {
           if (primes[i]) {
               n-=i;
               sum.add(i);
               break;
           }
       }
        for (int i=0;i<=n;i++) {
            if ((primes[i])&&((primes[n-i])||(n-i==0))) {
                sum.add(i);
                if (n-i!=0) {
                    sum.add(n-i);
                }
                break;
            }
        }
        System.out.println(sum.size());
        for (Integer i: sum) {
            System.out.println(i);
        }
    }
}

import java.io.PrintWriter;
import java.util.Scanner;

public class pr584D {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        solve(n, out);
        out.flush();
        out.close();
    }

    private static void solve(int n, PrintWriter out) {
        if (isPrime(n)) {
            out.println(1);
            out.println(n);
            return;
        }
        for(int i = n - 2; i > 0 ; i--) {
            if(isPrime(i)) {
                if(n - i == 2) {
                    out.println(2);
                    out.print(2 + " " + i);
                }
                else {
                    out.println(3);
                    int p = n - i;
                    for (int j = 2; j < p - 1; j++){
                        if(isPrime(j) && isPrime(p - j)){
                            out.println(i + " " + (p-j) + " " + j);
                            return;
                        }
                    }
                }
            }
        }
    }

    private static boolean isPrime(int n) {
        for(int i = 2; i <= Math.round(Math.sqrt(n)); i++) {
            if(n % i == 0) return false;
        }
        return true;
    }

}

/**
 *
 * @author meashish
 */
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.Serializable;
import java.util.HashSet;
import java.util.InputMismatchException;

public class Main {

    InputReader in;
    Printer out;

    static long MOD = 1000000007;

    int p[] = new int[10000001];

    private void start() throws Exception {
        p[0] = p[1] = 1;
        for (int i = 2; i * i < 10000000; i++) {
            if (p[i] == 0) {
                for (int j = 2; i * j <= 10000000; j++) {
                    p[i * j] = 1;
                }
            }

        }

        HashSet<Integer> set = new HashSet<>();

        for (int i = 0; i <= 1000; i++) {
            if (p[i] == 0) {
                set.add(i);
            }
        }

        int n = in.nextInt();

        if (n == 2 || n == 3 || n == 5 || n == 7) {
            out.println(n);
        } else if (n == 4) {
            out.println("2\n 2 2");
        } else if (n == 6) {
            out.println("3\n 2 2 2");
        } else if (n == 8) {
            out.println("2\n 3 5");
        } else if (n == 9) {
            out.println("3\n 3 3 3");
        } else if (n == 10) {
            out.println("3\n 2 3 5");
        } else if (n == 11) {
            out.println("3\n 2 2 7");
        } else if (n == 12) {
            out.println("2\n 5 7");
        } else if (n == 13) {
            out.println("1\n 13");
        } else if (n == 14) {
            out.println("2\n 2 11");
        } else if (n == 15) {
            out.println("2\n 2 13");
        } else {
            out.println(3);
            n -= 3;

            for (int i : set) {
                if (set.contains(n - i)) {
                    out.println("3 " + i + " " + (n - i));
                    break;
                }
            }
        }

        out.flush();
    }

    boolean isPrime(int a) {
        return false;
    }

    long pow(long x, long n) {
        if (n <= 0) {
            return 1;
        }

        long y = pow(x, n / 2);

        if ((n & 1) == 0) {
            return (y * y) % MOD;
        } else {
            return (((y * y) % MOD) * x) % MOD;
        }
    }

    public static void main(String[] args) throws Exception {
        InputReader in;
        PrintStream out;

        //in = new InputReader(new FileInputStream(new File("in.txt")));
        //out = new PrintStream("out.txt");
        in = new InputReader(System.in);
        out = System.out;

        Main main = new Main();

        main.in = in;
        main.out = new Printer(out);

        main.start();
    }

    private static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E') {
                    return res * Math.pow(10, nextInt());
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E') {
                        return res * Math.pow(10, nextInt());
                    }
                    if (c < '0' || c > '9') {
                        throw new InputMismatchException();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return nextString();
        }

        public interface SpaceCharFilter {

            public boolean isSpaceChar(int ch);
        }
    }

    private static class Printer {

        PrintStream out;
        StringBuilder buffer = new StringBuilder();
        boolean autoFlush;

        public Printer(PrintStream out) {
            this.out = out;
        }

        public Printer(PrintStream out, boolean autoFlush) {
            this.out = out;
            this.autoFlush = autoFlush;
        }

        public void println() {
            buffer.append("\n");

            if (autoFlush) {
                flush();
            }
        }

        public void println(int n) {
            println(Integer.toString(n));
        }

        public void println(long n) {
            println(Long.toString(n));
        }

        public void println(double n) {
            println(Double.toString(n));
        }

        public void println(float n) {
            println(Float.toString(n));
        }

        public void println(boolean n) {
            println(Boolean.toString(n));
        }

        public void println(char n) {
            println(Character.toString(n));
        }

        public void println(byte n) {
            println(Byte.toString(n));
        }

        public void println(short n) {
            println(Short.toString(n));
        }

        public void println(Object o) {
            println(o.toString());
        }

        public void println(String s) {
            buffer.append(s).append("\n");

            if (autoFlush) {
                flush();
            }
        }

        public void print(String s) {
            buffer.append(s);

            if (autoFlush) {
                flush();
            }
        }

        public void flush() {
            try {
                BufferedWriter log = new BufferedWriter(new OutputStreamWriter(out));
                log.write(buffer.toString());

                log.flush();
                buffer = new StringBuilder();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    private class Pair<K, V> implements Serializable {

        private K key;

        public K getKey() {
            return key;
        }
        private V value;

        public V getValue() {
            return value;
        }

        public Pair(K key, V value) {
            this.key = key;
            this.value = value;
        }

        @Override
        public String toString() {
            return key + "=" + value;
        }

        @Override
        public int hashCode() {
            return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o instanceof Pair) {
                Pair pair = (Pair) o;
                if (key != null ? !key.equals(pair.key) : pair.key != null) {
                    return false;
                }
                if (value != null ? !value.equals(pair.value) : pair.value != null) {
                    return false;
                }
                return true;
            }
            return false;
        }
    }

}

import java.io.*;
import java.util.*;
import java.util.concurrent.BrokenBarrierException;

import javax.swing.text.html.MinimalHTMLWriter;

import static java.lang.Math.abs;
import static java.lang.Math.max;
import static java.lang.Math.min;

public class Main {

    public static void main(String [] args){
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Integer readFromFile=new Integer(1);
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }
    static class TaskD {
        void madAdd(Map <Integer, Integer> map, int value){
            if(map.containsKey(value)){
                map.put(value, map.get(value)+1);
            }else{
                map.put(value, 1);
            }
        }
        //I have to try at least two ways to solve this problem, I'll make one of them with ;
        class Pair implements Comparable<Pair>{
            int fist;
            int second;
            Pair(int fist, int second){
                this.fist = fist;
                this.second = second;
            }
            @Override
            public int compareTo(Pair arg0) {
                if(arg0.fist!=arg0.second){
                    return fist-arg0.fist;
                }else{
                    return arg0.second-second;
                }
            }
        }
        int _gdc(int a, int b){
            if(a%b==0){
                return b;
            }else{
                return gdc(b, a%b);
            }
        }
        int gdc(int a, int b){
            if(a>=b){
                return _gdc(a, b);
            }else{
                return _gdc(b, a);
            }
        }

        boolean isPassedF(int []array, int c){
            boolean isPassed = false;
            long sum=0;
            for(int i=0, sum1=c; i<array.length-1; i++){
                if(sum1+array[i]-array[i+1]<0){
                    isPassed=true;
                    break;
                }else{
                    sum1+=array[i]-array[i+1];
                }
            }
            return isPassed;
        }
        int pow(int a, int n){
            int result = 1;
            for(int i=0; i<n; i++){
                result*=a;
            }
            return result;
        }

        void eratos(byte []primeNum){
            int size = primeNum.length;
            for(int i=2; i*i<size; i++){
                if(primeNum[i]==0){
                    for(int j=i+i; j<size; j+=i){
                        primeNum[j]=1;
                    }
                }
            }
        }

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            //2 ways and sort
            int n = in.nextInt();
            if(n==1){
                out.println(1+" "+1+" "+1);
                return;
            }
            final int maxValue = 1000_000;
            byte []primeValue= new byte[maxValue];
            eratos(primeValue);
            List<Integer> onlyPrime = new ArrayList<>(50000);
            for(int i=2; i<maxValue; i++){
                if(primeValue[i]==0){
                    onlyPrime.add(i);
                }
            }

            int maxPrime =0;
            line1:for(int i=n; i>=0; i--){
                for(int j=0; j<onlyPrime.size(); j++){
                    if(i%onlyPrime.get(j)==0){
                        break;
                    }else if(onlyPrime.get(j)*onlyPrime.get(j)>i){
                        maxPrime = i;
                        break line1;
                    }
                }
            }
            if(primeValue[n-maxPrime]==0){
                out.println(2);
                out.println(maxPrime+" "+(n-maxPrime));
                return;
            }
            n-=maxPrime;
            for(int i=1; i<=n; i++){
                if(primeValue[i]==0 && primeValue[n-i]==0){
                    out.println(3);
                    out.println(maxPrime+" "+i+" "+(n-i));
                    return;
                }
            }
        }
    }

    static class InputReader {
        BufferedReader br;
        StringTokenizer st;
        String st1;
        File file = new File("D:\\text.txt");
        public InputReader(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
            st = null;
        }
        public InputReader(int i) {
            try {
                br  = new BufferedReader(
                        new InputStreamReader(new FileInputStream(file)));
            } catch (FileNotFoundException e1) {
                System.out.println("File is not find");
            }
            st = null;
        }
        public String next(){
            while (st==null || !st.hasMoreTokens()){
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public String nextLine(){
            try {
                st1 = new String(br.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return st1;
        }
        public int nextInt()  {return Integer.parseInt(next());}
        public long nextLong(){
            return Long.parseLong(next());
        }
        public Double nextDouble(){
            return Double.parseDouble(next());
        }
        public Byte nextByte() {
            return Byte.parseByte(next());
        }
        private int idx;
        public Character nextChar() {
            if(st1==null) {
                st1 = next();
                idx = 0;
            }
            if(idx!=(st1.length())-1){
                return st1.charAt(idx++);
            }else{
                char  c= st1.charAt(idx);
                st1 = null;
                return c;
            }
        }
        public void newFile() {
            try {
                FileWriter write = new FileWriter(file);
                write.write("something for cheaking");
                write.close();

            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        public void writeFile1(){
            try{
                FileWriter write = new FileWriter(file);
                write.append("100000"+" ");
                for(int i=0; i<100000; i++){
                    write.append(new Integer((int)(Math.random()*5000)).toString()+" ");
                }
                write.close();

            }catch(IOException e){
                e.printStackTrace();
            }
        }
    }
}

import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
        int n =in.nextInt();
        if (isPrime(n))
        {
            out.printLine(1);
            out.printLine(n);
        }
        else
        {
            if (isPrime(n-2))
            {
                out.printLine(2);
                out.printLine(2+" "+(n-2));
            }
            else
            {
                int ans1=0;

                n-=3;
                for (int i =1;i<n;i++)
                {
                    if (isPrime(i)&&isPrime(n-i))
                    {
                        ans1=i;
                        break;
                    }
                }
                out.printLine(3);
                out.printLine(3+" "+ans1+" "+(n-ans1));
            }
        }

        out.flush();
    }
    static boolean isPrime(int a)
    {
        for (int i =2;i<=Math.sqrt(a);i++)
            if (a%i==0)
                return false;
        return true;
    }

}

class pair  implements Comparable
{

    int key;
    int value;
    public pair(Object key, Object value) {

        this.key = (int)key;
        this.value=(int)value;
    }

    @Override
    public int compareTo(Object o) {
        pair temp =(pair)o;
        return  key-temp.key;
    }
}
class Graph {

    int n;
    ArrayList<Integer>[] adjList;

    public Graph(int n) {
        this.n = n;
        adjList = new ArrayList[n];
        for (int i = 0; i < n; i++)
            adjList[i] = new ArrayList<>();
    }

}

class InputReader {

    private final InputStream stream;
    private final byte[] buf = new byte[8192];
    private int curChar, snumChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (snumChars == -1)
            throw new InputMismatchException();
        if (curChar >= snumChars) {
            curChar = 0;
            try {
                snumChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (snumChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long nextLong() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public int[] nextIntArray(int n) {
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public String nextLine() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    }

}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

    public void flush() {
        writer.flush();
    }

}

import java.awt.Point;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.StringTokenizer;
import static java.lang.Math.*;
import java.util.Map;
import java.util.Scanner;

/**
 *
 * @author Mojtaba
 */
public class Main {

    static int[] from;

    public static void main(String[] args) throws IOException {
        MyScanner in = new MyScanner(System.in);
        PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out));
        StringBuilder sb = new StringBuilder("");

        int n = in.nextInt();
        search:
        {
            for (int i = 2; i <= n; i++) {
                if (isPrime(i)) {
                    int nmi = n - i;
                    if (nmi == 0) {
                        sb.append("1\n").append(i);
                        break search;
                    }
                    if (nmi == 2) {
                        sb.append("2\n2 ").append(i);
                        break search;
                    }
                    for (int j = 2; j < nmi; j++) {
                        if (isPrime(nmi - j) && isPrime(j)) {
                            sb.append("3\n").append(i).append(" ").append(nmi - j).append(" ").append(j);
                            break search;
                        }
                    }
                }
            }
        }

        //System.out.println(sb.toString().trim());
        writer.println(sb.toString().trim());
        writer.flush();
        in.close();
    }

    static void sort(int[] a) {
        Random rand = new Random();
        for (int i = a.length - 1; i > 0; i--) {
            int index = rand.nextInt(i + 1);
            // Simple swap
            int temp = a[index];
            a[index] = a[i];
            a[i] = temp;
        }
        Arrays.sort(a);
    }

    private static boolean isPrime(int n) {
        if (n < 2) {
            return false;
        }
        int lim = (int) sqrt(n);
        for (int i = 3; i <= lim; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }
}

class MyScanner {

    BufferedReader reader;
    StringTokenizer tokenizer;

    public MyScanner(InputStream stream) {
        this.reader = new BufferedReader(new InputStreamReader(stream));
    }

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

    public int[] nextIntegerArray(int n) throws IOException {
        int[] a = new int[n];
        for (int i = 0; i < a.length; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    public long[] nextLongArray(int n) throws IOException {
        long[] a = new long[n];
        for (int i = 0; i < a.length; i++) {
            a[i] = nextLong();
        }
        return a;
    }

    public int nextInt(int radix) throws IOException {
        return Integer.parseInt(next(), radix);
    }

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

    public long nextLong(int radix) throws IOException {
        return Long.parseLong(next(), radix);
    }

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

    public BigInteger nextBigInteger() throws IOException {
        return new BigInteger(next());
    }

    public BigInteger nextBigInteger(int radix) throws IOException {
        return new BigInteger(next(), radix);
    }

    public String next() throws IOException {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
            return this.next();
        }
        return tokenizer.nextToken();
    }

    public void close() throws IOException {
        this.reader.close();
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.BufferedReader;
import java.util.regex.Pattern;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author amalev
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public boolean isPrime(long n) {
            long i = 2;
            while (i * i <= n) {
                if (n % i == 0) {
                    return false;
                }
                if (i == 2) {
                    i++;
                } else {
                    i += 2;
                }
            }
            return true;
        }

        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            boolean[] p1000 = new boolean[1000];
            int[] res1000 = new int[1000];
            for (int i = 2; i < 1000; i++) {
                p1000[i] = isPrime(i);
            }
            p1000[0] = true;
            for (int n = 2; n < 1000; n++) {
                if (n % 2 == 0) {
                    for (int p = n; p > 1; p--) {
                        if (p1000[p] && p1000[n - p]) {
                            res1000[n] = p;
                            break;
                        }
                    }
                    if (res1000[n] == 0) {
                        throw new RuntimeException("Not possible for n " + n);
                    }
                }
            }

            int n = in.nextInt();
            int p = n;
            while (p > 2 && !isPrime(p)) {
                p -= 2;
            }
            if (p < 2) {
                throw new RuntimeException("Not possible for n " + n);
            }
            out.print(p);
            if (p < n) {
                out.print(" ");
                out.print(res1000[n - p]);
                int c = n - p - res1000[n - p];
                if (c > 0) {
                    out.print(" ");
                    out.print(c);
                }
            }

        }

    }

    static class FastScanner {
        final BufferedReader input;
        String[] buffer;
        int pos;
        final static Pattern SEPARATOR = Pattern.compile("\\s+");

        public FastScanner(InputStream inputStream) {
            input = new BufferedReader(new InputStreamReader(inputStream));
        }

        private String read() {
            try {
                if (buffer == null || pos >= buffer.length) {
                    buffer = SEPARATOR.split(input.readLine());
                    pos = 0;
                }
                return buffer[pos++];
            } catch (Exception ex) {
                throw new RuntimeException(ex);
            }
        }

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

    }
}

import java.io.*;
import java.util.*;
public class dimaandliA {
    public static void main(String[] args) throws Exception
    {
        InputReader in=new InputReader(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=in.nextInt();
        if(isPrime(n))
        {
            pw.println(1);
            pw.println(n);
        }
        else if(isPrime(n-2))
        {
            pw.println(2);
            pw.println(n-2+" "+2);
        }
        for(int i=3;;i+=2)
        {
            if(isPrime(i) && isPrime(n-i-3))
            {
                pw.println(3);
                pw.println(i+" "+(n-i)+" "+3);
                break;

            }
        }

        pw.close();

    }

    public  static boolean isPrime(int num) {
        if (num == 2 ) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
        return true;
}

     static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }

            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

}

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class MainD {
	MyScanner sc = new MyScanner();
	Scanner sc2 = new Scanner(System.in);
	long start = System.currentTimeMillis();
	long fin = System.currentTimeMillis();
	final int MOD = 1000000007;
	int[] dx = { 1, 0, 0, -1 };
	int[] dy = { 0, 1, -1, 0 };

	void run() {
		int N = sc.nextInt();
		if (isPrime(N)) {
			System.out.println(1);
			System.out.println(N);
		} else {
			for (int q = N - 1; q >= 2; q--) {
				if (isPrime(q)) {
					// N-qは偶数(N,qが奇数より)のためゴールドバッハの予想が成り立つ
					// (4以上の偶数は２つの素数の和で表すことができる)
					int even = N - q;
					if (even == 2) {
						System.out.println(2);
						System.out.println(2 + " " + q);
					} else {
						boolean[] isPrime = new boolean[300 + 1];
						Arrays.fill(isPrime, true);
						isPrime[0] = isPrime[1] = false;
						for (int i = 2; i * i <= 300; i++) {
							if (!isPrime[i])
								continue;
							for (int j = i * 2; j <= 300; j += i)
								isPrime[j] = false;
						}
						for (int i = 2; i <= even; i++) {
							if (isPrime[i] && isPrime[even - i]) {
								System.out.println(3);
								System.out.println(i + " " + (even - i) + " " + q);
							}
						}
					}
					return;
				}
			}
		}
	}

	boolean isPrime(int N) {
		if (N <= 1)
			return false;
		for (int i = 2; i * i <= N; i++) {
			if (N % i == 0)
				return false;
		}
		return true;
	}

	public static void main(String[] args) {
		new MainD().run();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	void debug2(int[][] array) {
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				System.out.print(array[i][j]);
			}
			System.out.println();
		}
	}

	boolean inner(int h, int w, int limH, int limW) {
		return 0 <= h && h < limH && 0 <= w && w < limW;
	}

	void swap(int[] x, int a, int b) {
		int tmp = x[a];
		x[a] = x[b];
		x[b] = tmp;
	}

	// find minimum i (a[i] >= border)
	int lower_bound(int a[], int border) {
		int l = -1;
		int r = a.length;
		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (border <= a[mid]) {
				r = mid;
			} else {
				l = mid;
			}
		}
		// r = l + 1
		return r;
	}

	boolean palindrome(String s) {
		for (int i = 0; i < s.length() / 2; i++) {
			if (s.charAt(i) != s.charAt(s.length() - 1 - i)) {
				return false;
			}
		}
		return true;
	}

	class MyScanner {
		int nextInt() {
			try {
				int c = System.in.read();
				while (c != '-' && (c < '0' || '9' < c))
					c = System.in.read();
				if (c == '-')
					return -nextInt();
				int res = 0;
				do {
					res *= 10;
					res += c - '0';
					c = System.in.read();
				} while ('0' <= c && c <= '9');
				return res;
			} catch (Exception e) {
				return -1;
			}
		}

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

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

		String next() {
			try {
				StringBuilder res = new StringBuilder("");
				int c = System.in.read();
				while (Character.isWhitespace(c))
					c = System.in.read();
				do {
					res.append((char) c);
				} while (!Character.isWhitespace(c = System.in.read()));
				return res.toString();
			} catch (Exception e) {
				return null;
			}
		}

		int[] nextIntArray(int n) {
			int[] in = new int[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextInt();
			}
			return in;
		}

		int[][] nextInt2dArray(int n, int m) {
			int[][] in = new int[n][m];
			for (int i = 0; i < n; i++) {
				in[i] = nextIntArray(m);
			}
			return in;
		}

		double[] nextDoubleArray(int n) {
			double[] in = new double[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextDouble();
			}
			return in;
		}

		long[] nextLongArray(int n) {
			long[] in = new long[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextLong();
			}
			return in;
		}

		char[][] nextCharField(int n, int m) {
			char[][] in = new char[n][m];
			for (int i = 0; i < n; i++) {
				String s = sc.next();
				for (int j = 0; j < m; j++) {
					in[i][j] = s.charAt(j);
				}
			}
			return in;
		}
	}
}

import java.lang.StringBuilder;
import java.util.ArrayList;
import java.util.Scanner;

public final class Main {
	public static int[] rwhPrimes1(int n) {
		boolean[] sieve = new boolean[n/2];
		for (int i = 0; i < n/2; i++) {
			sieve[i] = true;
		}
		for (int i = 3; i < Math.sqrt(n) + 1; i += 2) {
			if (sieve[i/2]) {
				for (int j = i*i/2; j < i; j++) {
					sieve[j] = false;
				}
			}
		}

		ArrayList<Integer> p = new ArrayList<Integer>();
		p.add(2);
		for (int i = 1; i < n/2; i++) {
			if (sieve[i]) {
				p.add(2 * i + 1);
			}
		}

		int[] primes = new int[p.size()];
		for (int i = 0; i < p.size(); i++) {
			primes[i] = p.get(i);
		}

		return primes;
	}

	public static int[] findPrimePair(int n) {
		int[] pair = new int[2];

		boolean pairFound = false;
		int[] primes = rwhPrimes1(n);
		int low = 0;
		int high = primes.length - 1;

		while (!pairFound) {
			if (n - primes[low] == primes[high]) {
				pair[0] = primes[low];
				pair[1] = primes[high];
				pairFound = true;
				break;
			} else if (n - primes[low] > primes[high]) {
				low++;
			} else if (n - primes[low] < primes[high]) {
				high--;
			}
			if (low > high) {
				System.out.println("loop failed");
				break;
			}
		}

		return pair;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		if (n == 1 || n == 2 || n == 3 || n == 5) {
			System.out.println("1\n" + n);
		} else if (n == 4) {
			System.out.println("2\n2 2");
		} else {
			int firstPrime = 2;
			if (n % 2 == 1) {
				firstPrime = 3;
			}
			int[] primePair = findPrimePair(n - firstPrime);
			System.out.println("3\n" + firstPrime + " " + primePair[0] + " " + primePair[1]);
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class DimaAndLisa {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(in.readLine());
		if(check(n)) {
			System.out.println(1);
			System.out.println(n);
		} else if(check(n-2)) {
			System.out.println(2);
			System.out.println(2 + " " + (n-2));
		} else {
			int y = n;
			while(!check(y)) {
				y--;
			}
			y = y /2;
			while(!check(y) && !check(n - 2*y)) {
				y--;
			}
			System.out.println(3);
			System.out.println((n - 2*y) + " " + y + " " + y);

		}
	}

	public static boolean check(int a) {
		boolean isPrime = true;
		for(int i = 2;i<=(int) Math.floor(Math.sqrt(a));i++){
			if(a % i == 0) {
				isPrime = false;
				break;
			}
		}
		return isPrime;
	}
}

import java.util.*;
import java.io.*;
public class Train {

   public static void main(String[] args) {

		Scanner kb =new Scanner(System.in);
                int n = kb.nextInt();
                ArrayList<Integer> ans = new ArrayList<Integer>();
                if(isPrime(n)){
                    ans.add(n);
                }
                else{
                    n-=11;
                    if(isPrime(n)){
                        ans.add(n);
                    }
                    else{
                        for(int i =2;i<n;i++){
                            if(isPrime(i) && isPrime(n)){
                                ans.add(i);
                                ans.add(n);
                                break;
                            }
                        }
                    }
                }
                System.out.println(ans.size());
                for(int k:ans){
                    System.out.print(k+" ");
                }
}
   public static boolean isPrime(int n){
       for(int i =1;i<=Math.sqrt(n);i++){
           if(n%i==0){
               return false;
           }
       }
       return true;
   }
}

//package CodeForces.Round324;

import java.util.*;
import java.util.stream.LongStream;
import java.util.stream.Stream;

/**
 * Created by Ilya Sergeev on 09.10.2015.
 */
public class EDimaLiza {
/*
    public static boolean[] fillSieve(int n){
        boolean[] primes=new boolean[n+1];
        Arrays.fill(primes, true);
        primes[0] = primes[1] = false;
        for (int i = 2; i < primes.length; i++) {
            if (primes[i]) {
                for (int j=2;i*j<primes.length;j++) {
                    primes[i*j]=false;
                }
            }
        }
        return primes;
    }

    public static LinkedList<Integer> count(List<Integer> primes, int n){
        LinkedList<Integer> list = new LinkedList<>();
        int[] ost = new int[n];
        if(primes.contains(n)){
            list.push(n);
            return list;
        }
        for (int i = 0; i < ost.length; i++) {
            ost[i] = -1;
        }
        for (int i = 0; i < primes.size(); i++) {
            if(n == primes.get(i)*3){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(primes.get(i));
                return list;
            }
            ost[n - primes.get(i)] = primes.get(i);
        }
        for (int i = 0; i < primes.size(); i++) {
            int c = primes.get(i)*2;
            if(n > c && ost[c] != -1){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(ost[c]);
                return list;
            }
        }
        return null;
    }
*/
    public static boolean isPrime(long number){
        return number > 1 &&
                LongStream.range(2, (long) Math.sqrt(number)+1)
                          .noneMatch(i -> number % i == 0);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        List<Long> list = new LinkedList<>();
        if(n > 300){
            long p = n - 300;
            Optional<Long> t = Stream.iterate(n-1, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(300)
                    .findAny();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i < n - list.get(0); i++) {
                    if(isPrime(i)){
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() > 1){
                    System.out.println(list.size());
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
        else{
            Optional<Long> t = Stream.iterate(n, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(n)
                    .findFirst();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i <= n - list.get(0); i++) {
                    if(isPrime(i)){
                        if(i ==  n - list.get(0)){
                            list.add((long) i);
                            break outer;
                        }
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() >= 1){
                    System.out.println(list.size());
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class Main1 {
	static PrintWriter out = new PrintWriter(System.out);
	static FastReader input = new FastReader();
	static final int MAXN = (int) (1e7);
	static ArrayList<Integer> primes = new ArrayList<>();

	static void sieve() {
		boolean np[] = new boolean[MAXN + 1];
		np[0] = np[1] = true;

		for (int i = 2; i * i <= MAXN; i++) {
			if (!np[i]) {
				for (int j = i * i; j <= MAXN; j += i) { np[j] = true; }
			}
		}
		for (int i = 0; i < MAXN; i++) {
			if (!np[i]) {
				primes.add(i);
			}
		}

	}

	static int largestPrime(int key) {
		int l = 0;
		int r = primes.size() - 1;
		while (l < r) {
			int m = l + (r - l + 1) / 2;
			if (primes.get(m) <= key) {
				l = m;
			} else {
				r = m - 1;
			}
		}
		return primes.get(l);
	}

	public static void main(String[] args) throws IOException {
		sieve();

		int n = input.nextInt();
		int a[] = new int[3];
		int ptr = 0;

		for (int i = n; i >= 0; i--) {
			boolean prim = true;
			for (int j = 0; j < primes.size(); j++) {
				int p = primes.get(j);
				if ((long) p * p > i) {
					break;
				}
				if (i % p == 0) {
					prim = false;
					break;
				}
			}
			if (prim) {
				a[ptr++] = i;
				break;
			}

		}
		n -= a[ptr - 1];
		if (n != 0) {
			for (int i = 0; i < primes.size(); i++) {
				int p = primes.get(i);
				if (n - p - largestPrime(n - p) == 0) {
					a[ptr++] = p;
					a[ptr++] = largestPrime(n - p);
					break;
				}
			}
		}

		out.println(ptr);
		for (int i = 0; i < ptr; i++) { out.print(a[i] + " "); }
		out.println();
		out.flush();

	}

	static class con {
		static int IINF = (int) 1e9;
		static int _IINF = (int) -1e9;
		static long LINF = (long) 1e15;
		static long _LINF = (long) -1e15;
		static double EPS = 1e-9;
	}

	static class Triple implements Comparable<Triple> {
		int x;
		int y;

		int z;

		Triple(int x, int y, int z) {
			this.x = x;
			this.y = y;
			this.z = z;
		}

		@Override
		public int compareTo(Triple o) {
			if (x == o.x && y == o.y)
				return z - o.z;
			if (x == o.x)
				return y - o.y;
			return x - o.x;
		}

		@Override
		public String toString() { return "(" + x + ", " + y + ", " + z + ")"; }
	}

	static class Pair implements Comparable<Pair> {
		int x;
		int y;

		Pair(int x, int y) {
			this.x = x;
			this.y = y;

		}

		@Override
		public int compareTo(Pair o) {
			if (x == o.x)
				return y - o.y;
			return x - o.x;
		}

		@Override
		public String toString() {

			return "(" + x + ", " + y + ")";
		}

	}

	static void shuffle(int[] a) {
		for (int i = 0; i < a.length; i++) {
			int r = i + (int) (Math.random() * (a.length - i));
			int tmp = a[r];
			a[r] = a[i];
			a[i] = tmp;
		}
	}

	static int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }

	static class DSU {

		int[] p, rank, setSize;
		int numSets;

		DSU(int n) {
			p = new int[n];
			rank = new int[n];
			setSize = new int[n];
			numSets = n;

			for (int i = 0; i < n; i++) {
				p[i] = i;
				setSize[i] = 1;
			}

		}

		int findSet(int n) { return p[n] = p[n] == n ? n : findSet(p[n]); }

		boolean isSameSet(int n, int m) { return findSet(n) == findSet(m); }

		void mergeSet(int n, int m) {

			if (!isSameSet(n, m)) {
				numSets--;
				int p1 = findSet(n);
				int p2 = findSet(m);

				if (rank[p1] > rank[p2]) {
					p[p2] = p1;
					setSize[p1] += setSize[p2];
				} else {
					p[p1] = p2;
					setSize[p2] += setSize[p1];
					if (rank[p1] == rank[p2])
						rank[p1]++;
				}
			}

		}

		int size() { return numSets; }

		int setSize(int n) { return setSize[findSet(n)]; }

	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); }

		String next() throws IOException {
			while (st == null || !st.hasMoreElements()) { st = new StringTokenizer(br.readLine()); }
			return st.nextToken();
		}

		int nextInt() throws NumberFormatException, IOException { return Integer.parseInt(next()); }

		long nextLong() throws NumberFormatException, IOException { return Long.parseLong(next()); }

		double nextDouble() throws NumberFormatException, IOException { return Double.parseDouble(next()); }

		String nextLine() throws IOException {
			String str = "";
			str = br.readLine();
			return str;
		}

		boolean hasNext() throws IOException { return br.ready(); }
	}

	static class Reader {
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader() {
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException {
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException {
			byte[] buf = new byte[1024];
			int cnt = 0, c;
			while ((c = read()) != -1) {
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException {
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException {
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException {
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9');
			if (c == '.')
				while ((c = read()) >= '0' && c <= '9')
					ret += (c - '0') / (div *= 10);
			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException {
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException {
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException {
			if (din == null)
				return;
			din.close();
		}
	}

}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class C324D
{

private static StringTokenizer st;

    public static void nextLine(BufferedReader br) throws IOException
    {
        st = new StringTokenizer(br.readLine());
    }

    public static int nextInt()
    {
        return Integer.parseInt(st.nextToken());
    }

    public static String next()
    {
        return st.nextToken();
    }

    public static long nextLong()
    {
        return Long.parseLong(st.nextToken());
    }

    public static double nextDouble()
    {
        return Double.parseDouble(st.nextToken());
    }

    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        nextLine(br);
        long n = nextLong();
        long v = n;
        while (true)
        {
            if (BigInteger.valueOf(v).isProbablePrime(200)) break;
            v--;
        }
        if (v == n)
        {
            System.out.println(1);
            System.out.println(v);
            return;
        }
        if (n - v == 4)
        {
            System.out.println(3);
            System.out.println(v + " 2 2");
            return;
        }

        boolean[] primes = genPrimes(1000000);
        for (int i = 3; i <= (n - v) / 2; i++)
        {
            if (primes[i] && primes[(int)(n-v-i)])
            {
                System.out.println(3);
                System.out.println(v + " " + i + " " + (n-v-i));
                return;
            }
        }
    }

    static boolean[] genPrimes(int n)
    {
        boolean[] primes = new boolean[n];
        Arrays.fill(primes, true);
        primes[1] = false;
        for (int i = 2; i < n; i++)
        {
            if (!primes[i]) continue;
            for (int j = i*2; j < n; j+=i)
            {
                primes[j] = false;
            }
        }
        return primes;
    }

}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by peacefrog on 12/6/15.
 * Time : 5:31 PM
 */

public class CF584D {
	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	PrintWriter out;
	long timeBegin, timeEnd;

	public void runIO() throws IOException {
		timeBegin = System.currentTimeMillis();

		InputStream inputStream;
		OutputStream outputStream;

		if (ONLINE_JUDGE) {
			inputStream = System.in;
			Reader.init(inputStream);
			outputStream = System.out;

			out = new PrintWriter(outputStream);

		} else {
			inputStream = new FileInputStream("/home/peacefrog/Dropbox/IdeaProjects/Problem Solving/input");
			Reader.init(inputStream);
			out = new PrintWriter(System.out);
		}

		solve();

		out.flush();
		out.close();
		timeEnd = System.currentTimeMillis();

		System.err.println("Time = " + (timeEnd - timeBegin));

	}

	/*
	 * Start Solution Here
	 */
	boolean check(long x )
	{
		long sqrt = (long) Math.sqrt(x);
		for (int i = 2; i <= sqrt; i++) {
			if(x % i == 0 ) return false ;
		}
		return true ;
	}
	private void solve() throws IOException {
		long n = Reader.nextLong(); //This Variable default in Code Template

		for (int i = 2; i <= n; i++) {
			if(check(i))
			{
				n -= i ;
				if(n == 2 )
				{
					out.println(2);
					out.println( i + " " + 2);
					return;
				}
				else if(n == 3 )
				{
					out.println(2);
					out.println( i + " " + 3);
					return;
				}
				else if(n == 4 )
				{
					out.println(3);
					out.println( i + " " + 2 + " " + 2);
					return;
				}

				for (int j = 2; j <= n; j++) {
					if(check(j) && check(n-j))
					{
						out.println(3);
						out.println( i + " " + j + " " + (n-j) );
						return;
					}
				}

			}
		}
	}

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

		new CF584D().runIO();
	}

	static class Reader {
		static BufferedReader reader;
		static StringTokenizer tokenizer;

		/**
		 * call this method to initialize reader for InputStream
		 */
		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer("");
		}

		/**
		 * get next word
		 */
		static String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		static String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return "";
		}

		static int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		static long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		static double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		static long[] nextLongArray(int n) throws IOException {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}

			return arr;
		}

		static int[] nextIntArray(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}

			return arr;
		}
	}

}

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n;
        n = sc.nextInt();
        if(isPrime(n)){
            System.out.printf("1\n %d\n",n);
        }else if(isPrime(n-2)){
            System.out.printf("2\n 2 %d", n-2);
        }else{
            boolean fl = false;
            for(int i=3; i<=300 && !fl; i+=2){
                if(isPrime(i)){
                    int k = n-i;
                    if(isPrime(k)){
                        System.out.printf("2\n%d %d\n",i,k);
                        break;
                    }else{
                        for(int l=3; l<=300; l+=2){
                            if(isPrime(l) && isPrime(k-l)){
                                System.out.printf("3\n%d %d %d\n",i,k-l,l);
                                fl = true;
                                break;
                            }
                        }
                    }
                }
            }
        }
    }

    public static boolean isPrime(int n){
        if(n == 1) return false;
        for(int i=3; i*i <= n; i++){
            if(n%i == 0){
                return false;
            }
        }
        return true;
    }
}

import java.util.*;
import java.io.*;
import java.math.*;

public class D {
	static ArrayList<Integer> primes = new ArrayList<Integer>();

	static void sieve() {
		boolean[] p = new boolean[1000000];
		for (long i=2; i<1000000; i++) {
			if (p[(int)i]) continue;
			primes.add((int)i);
			for (long j=i*i; j<1000000; j+=i) {
				p[(int)j] = true;
			}
		}
	}

	public static void main(String[] args) throws Exception {
		sieve();
		Scanner sc = new Scanner(System.in);
		BigInteger n = sc.nextBigInteger();
		if (n.isProbablePrime(12)) {
			System.out.println(1);
			System.out.println(n.toString());
			return;
		}
		if (n.subtract(BigInteger.valueOf(2)).isProbablePrime(12)) {
			System.out.println(2);
			System.out.println("2 " + n.subtract(BigInteger.valueOf(2)).toString());
			return;
		}
		for (int i=0; i<primes.size(); i++) {
			BigInteger x = n.subtract(BigInteger.valueOf(primes.get(i)));
			x = x.divide(BigInteger.valueOf(2));
			if (x.isProbablePrime(12)) {
				System.out.println(3);
				System.out.printf("%d %s %s\n", primes.get(i), x.toString(), x.toString());
				return;
			}
		}
	}
}

//package codeforces.FiveEightFour;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class TestD {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new TestD().solve();
	}

	public void solve() {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));

		String s;
		try {
			while ((s = reader.readLine()) != null) {
				int n = Integer.valueOf(s).intValue();
				System.out.println("-----------" + n);
				int a = priPrime(n-1);
				System.out.println("-----------" + a);
				int remain = n - a;
				int b = 0;
				int c = 0;
				boolean flag = true;
				for (; flag == true; a = priPrime(a)) {
					remain = n - a;
					for (b = 2; flag == true; b++) {
						c = n - a - b;
						if (isPrime(b) && isPrime(c)) {
							if (c == 0) {
								System.out.println("2");
								System.out.println(a + " " + b);
							} else {
								System.out.println("3");
								System.out.println(a + " " + b + " " + c);
							}
							flag = false;
						}
					}
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static int priPrime(int n) {
		while (!isPrime(n)) {
			n--;
		}
		return n;
	}

	public static boolean isPrime(int n) {
		int flag = (int) Math.sqrt(n);
		for (int i = 2; i <= flag; i++) {
			if (n % i == 0)
				return false;
		}
		return true;
	}

}

	import java.io.BufferedReader;
	import java.io.IOException;
	import java.io.InputStreamReader;
	import java.util.ArrayList;
	import java.util.Arrays;
	import java.util.Collections;
	import java.util.Comparator;
	import java.util.HashMap;
	import java.util.HashSet;
	import java.util.LinkedList;
	import java.util.List;
	import java.util.Map;
	import java.util.PriorityQueue;
	import java.util.Queue;
	import java.util.Random;
	import java.util.Set;
	import java.util.Stack;

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

		public static void main(String[] args) throws InterruptedException {
			//new careercup().run();
			//new CC().run();
			//System.out.println(Integer.MAX_VALUE);
			try{
				BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				int n = Integer.parseInt(br.readLine());
				boolean[] noprime = new boolean[n+1];
				for(int i=2; i*i<=n; i++) {
					for(int j=i*i; j<=n; j+=i) {
						noprime[j] = true;
					}
				}
				if(!noprime[n]) {
					System.out.println(1);
					System.out.println(n);
					return;
				}
				int a = 3;
				n -= a;
				for(int i=3; i<n/2; i++) {
					if(noprime[i])  continue;
					if(!noprime[n-i]) {
						System.out.println(3);
						System.out.println(3+" "+i+" "+(n-i));
						return;
					}
				}
			}catch(IOException io){
				io.printStackTrace();
			}
		}

	}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class cf584d implements Runnable {
	public static final String taskname = cf584d.class.getName();

	public StringTokenizer strtok;
	public BufferedReader inr;
	public PrintWriter out;

	public static void main(String[] args) {
		new Thread(new cf584d()).start();
	}

	public void run() {
		Locale.setDefault(Locale.US);
		boolean oj = System.getProperty("ONLINE_JUDGE") != null;
		try {
			inr = new BufferedReader(oj ? new InputStreamReader(System.in, "ISO-8859-1") : new FileReader(taskname + ".in"));
			out = new PrintWriter(oj ? new OutputStreamWriter(System.out, "ISO-8859-1") : new FileWriter(taskname + ".out"));
			solve();
		} catch (Exception e) {
			if (!oj)
				e.printStackTrace();
			System.exit(9000);
		} finally {
			out.flush();
			out.close();
		}
	}

	public String nextToken() throws IOException {
		while (strtok == null || !strtok.hasMoreTokens()) {
			strtok = new StringTokenizer(inr.readLine());
		}
		return strtok.nextToken();
	}

	public int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	// Solution

	boolean isPrime(int i) {
		for (int d = 2; d <= Math.sqrt(i) + 1; d++) {
			if (i % d == 0) {
				return false;
			}
		}
		return true;
	}

	public void solve() throws NumberFormatException, IOException {
		ArrayList<Integer> primes = new ArrayList<Integer>();
		primes.add(2);
		for (int i = 2; i < 5000; i++) {
			if (isPrime(i)) {
				primes.add(i);
			}
		}

		HashSet<Integer> pregen = new HashSet<Integer>(primes);
		for (int i : primes) {
			for (int j : primes) {
				pregen.add(i + j);
			}
		}

		int n =  nextInt();
		if (Collections.binarySearch(primes, n - 4) >= 0) {
			out.printf("3\n2 2 %d", n - 4);
			return;
		}

		if ((new BigInteger(((Integer)(n)).toString())).isProbablePrime(15)) {
			out.printf("1\n%d", n);
		}

		for (int v : pregen) {
			BigInteger nnn = new BigInteger(((Integer)(n - v)).toString());
			if (nnn.isProbablePrime(15)) {
				// reconstructing
				if (Collections.binarySearch(primes, v) >= 0) {
					out.printf("2\n%d %d", v, n - v);
				}
				else {
					for (int vv : primes) {
						if (Collections.binarySearch(primes, v - vv) >= 0) {
							out.printf("3\n%d %d %d", vv, v - vv, n - v);
						}
					}
				}
			}

		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public final class DimaAndLisa {
	static int biggestPrime(int n) {
		for (int i = n; i >= 2; i -= 1)
			if (isPrime(i))
				return i;
		return -1;
	}

	// checks whether an int is prime or not.
	static boolean isPrime(int n) {
		if (n == 2)
			return true;

		if (n <= 1)
			return false;
		// check if n is a multiple of 2
		if (n % 2 == 0)
			return false;
		// if not, then just check the odds
		for (int i = 3; i * i <= n; i += 2) {
			if (n % i == 0)
				return false;
		}
		return true;
	}

	public static void main(String args[]) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(input.readLine());
		int first = biggestPrime(n);
		n -= first;
		for (int i = 2; i <= 1000; i += 1) {
			if (isPrime(i) && isPrime(n - i)) {
				System.out.println(3);
				System.out.println(first + " " + i + " " + (n - i));
				break;
			}
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public final class DimaAndLisa {
	static int biggestPrime(int n) {
		for (int i = n; i >= 2; i -= 1)
			if (isPrime(i))
				return i;
		return -1;
	}

	// checks whether an int is prime or not.
	static boolean isPrime(int n) {
		if (n == 2)
			return true;

		if (n <= 1)
			return false;
		// check if n is a multiple of 2
		if (n % 2 == 0)
			return false;
		// if not, then just check the odds
		for (int i = 3; i * i <= n; i += 2) {
			if (n % i == 0)
				return false;
		}
		return true;
	}

	public static void main(String args[]) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(input.readLine());
		int first = biggestPrime(n);
		n -= first;
		if (n == 0) {
			System.out.println(1);
			System.out.println(first);
			return;
		}
		for (int i = 2; i <= 1000; i += 1) {
			if (isPrime(i) && (first + i == n)) {
				System.out.println(2);
				System.out.println(first + " " + i);
				break;
			} else if (isPrime(i) && isPrime(n - i)) {
				System.out.println(3);
				System.out.println(first + " " + i + " " + (n - i));
				break;
			}
		}
	}
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

import static java.lang.Math.*;

public class SolveContest {
    private BufferedReader in;
    private PrintWriter out;

    public SolveContest() {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter(new FileWriter("output.txt"), true);
            solve();
        } catch (Exception e) {
            e.printStackTrace();
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            solve();
        } finally {
            try {
                in.close();
            } catch (IOException e) {

            }
            out.close();
        }
    }

    StringTokenizer st;

    String nextToken() {
        while (st == null || !st.hasMoreTokens())
            try {
                st = new StringTokenizer(in.readLine());
            } catch (IOException e) {

            }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.valueOf(nextToken());
    }

    long nextLong() {
        return Long.valueOf(nextToken());
    }

    double nextDouble() {
        return Double.valueOf(nextToken());
    }

    long gcd(long a, long b) {
        return b == 0?a:gcd(b,a%b);
    }

    boolean prime(int n) {
        for (int i = 2; i*i <= n; i++) {
            if (n % i == 0) return false;
        }
        return true;
    }

    public void solve() {
        int n = nextInt();
        int s = 10000000;
        boolean[] prime = new boolean[s];
        Arrays.fill(prime, true);
        prime[1] = false;
        for (int i = 1; i < s; i++) {
            if (prime[i])
                if (1L*i*i <= s) {
                    for (int j = i*i; j*j < s; j+=i) {
                        prime[j] = false;
                    }
                }
        }
        if (prime(n)) {
            out.println(1);
            out.print(n);
            return;
        }
        for(int i = 2; i < s;i++) {
            if (n > i && prime[i] && prime(n-i)) {
                out.println(2);
                out.print(i + " " + (n-i));
                return;
            }
        }
        for (int i = 2; i <= 5000; i++) {
            for (int j = i; j <= 5000; j++) {
                if (n > i+j && prime[i] && prime[j] && prime(n-i-j)) {
                    out.println(3);
                    out.println(i+" "+j+" "+(n-i-j));
                    return;
                }
            }
        }
    }

    class Pair implements Comparable<Pair>{
        int a;
        int b;

        Pair(int a, int b) {
            this.a = a;
            this.b = b;
        }

        @Override
        public int compareTo(Pair o) {
            if (a == o.a)
                return b-o.b;
            return a-o.a;
        }
    }

    public static void main(String[] args) {
        new SolveContest();
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class D_Round_324_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        TreeSet<Integer> list = new TreeSet();
        boolean[] p = new boolean[10000001];
        for (int i = 2; i < p.length; i++) {
            if (!p[i]) {
                list.add(i);
                for (int j = i + i; j < p.length; j += i) {
                    p[j] = true;
                }
            }
        }
        if (n < p.length) {
            if (!p[n]) {
                out.println(1);
                out.println(n);
            } else {
                int v = list.floor(n);
                int left = n - v;
                for (int i : list) {
                    if (i > left) {
                        break;
                    }
                    if (list.contains(left - i)) {
                        out.println(3);
                        out.println(v + " " + (left - i) + " " + i);
                        break;
                    }
                }

            }
        } else {
            while (true) {
                BigInteger tmp = BigInteger.valueOf(n - 1000);
                BigInteger v = tmp.nextProbablePrime();
                if (v.isProbablePrime(80)) {
                    int left = n - v.intValue();

                    for (int i : list) {
                        if (i > left) {
                            break;
                        }
                        if (list.contains(left - i)) {
                            out.println(3);
                            out.println(v + " " + (left - i) + " " + i);
                            break;
                        }
                    }
                    break;
                }

            }

        }

        out.close();
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    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 int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

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

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

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

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

        }
    }

    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("input.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();
            }
        }
    }
}

//package CodeForces.Round324;

import java.util.*;
import java.util.stream.LongStream;
import java.util.stream.Stream;

/**
 * Created by Ilya Sergeev on 09.10.2015.
 */
public class EDimaLiza {
/*
    public static boolean[] fillSieve(int n){
        boolean[] primes=new boolean[n+1];
        Arrays.fill(primes, true);
        primes[0] = primes[1] = false;
        for (int i = 2; i < primes.length; i++) {
            if (primes[i]) {
                for (int j=2;i*j<primes.length;j++) {
                    primes[i*j]=false;
                }
            }
        }
        return primes;
    }

    public static LinkedList<Integer> count(List<Integer> primes, int n){
        LinkedList<Integer> list = new LinkedList<>();
        int[] ost = new int[n];
        if(primes.contains(n)){
            list.push(n);
            return list;
        }
        for (int i = 0; i < ost.length; i++) {
            ost[i] = -1;
        }
        for (int i = 0; i < primes.size(); i++) {
            if(n == primes.get(i)*3){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(primes.get(i));
                return list;
            }
            ost[n - primes.get(i)] = primes.get(i);
        }
        for (int i = 0; i < primes.size(); i++) {
            int c = primes.get(i)*2;
            if(n > c && ost[c] != -1){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(ost[c]);
                return list;
            }
        }
        return null;
    }
*/
    public static boolean isPrime(long number){
        return number > 1 &&
                LongStream.range(2, (long) Math.sqrt(number)+1)
                          .noneMatch(i -> number % i == 0);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        List<Long> list = new LinkedList<>();
        if(n > 300){
            long p = n - 300;
            Optional<Long> t = Stream.iterate(n-1, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(300)
                    .findAny();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i < n - list.get(0); i++) {
                    if(isPrime(i)){
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() > 1){
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
        else{
            Optional<Long> t = Stream.iterate(n - 1, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(n)
                    .findFirst();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i < n - list.get(0); i++) {
                    if(isPrime(i)){
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() > 1){
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
    }
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by peacefrog on 12/6/15.
 * Time : 5:31 PM
 */

public class CF584D {
	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	PrintWriter out;
	long timeBegin, timeEnd;

	public void runIO() throws IOException {
		timeBegin = System.currentTimeMillis();

		InputStream inputStream;
		OutputStream outputStream;

		if (ONLINE_JUDGE) {
			inputStream = System.in;
			Reader.init(inputStream);
			outputStream = System.out;

			out = new PrintWriter(outputStream);

		} else {
			inputStream = new FileInputStream("/home/peacefrog/Dropbox/IdeaProjects/Problem Solving/input");
			Reader.init(inputStream);
			out = new PrintWriter(System.out);
		}

		solve();

		out.flush();
		out.close();
		timeEnd = System.currentTimeMillis();

		System.err.println("Time = " + (timeEnd - timeBegin));

	}

	/*
	 * Start Solution Here
	 */
	boolean check(long x )
	{
		long sqrt = (long) Math.sqrt(x);
		for (int i = 2; i <= sqrt; i++) {
			if(x % i == 0 ) return false ;
		}
		return true ;
	}
	private void solve() throws IOException {
		long n = Reader.nextLong(); //This Variable default in Code Template

		for (int i = 2; i <= n; i++) {
			if(check(i))
			{
				n -= i ;
				if(n == 0 )
				{
					out.println(1);
					out.println( i );
					return;
				}
				else if(n == 2 )
				{
					out.println(2);
					out.println( i + " " + 2);
					return;
				}
				else if(n == 4 )
				{
					out.println(3);
					out.println( i + " " + 2 + " " + 2);
					return;
				}

				for (int j = 3; j <= n; j++) {
					if(check(j) && check(n-j))
					{
						out.println(3);
						out.println( i + " " + j + " " + (n-j) );
						return;
					}
				}

			}
		}
	}

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

		new CF584D().runIO();
	}

	static class Reader {
		static BufferedReader reader;
		static StringTokenizer tokenizer;

		/**
		 * call this method to initialize reader for InputStream
		 */
		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer("");
		}

		/**
		 * get next word
		 */
		static String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		static String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return "";
		}

		static int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		static long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		static double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		static long[] nextLongArray(int n) throws IOException {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}

			return arr;
		}

		static int[] nextIntArray(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}

			return arr;
		}
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class ProblemD {
    private static List<Integer> primes = new ArrayList<Integer>();

    public static void main(String[] args) {
        InputReader in = new InputReader();
        PrintWriter out = new PrintWriter(System.out);

        new ProblemD().solve(in, out);

        out.close();
    }

    public void solve(InputReader in, PrintWriter out) {
        int n = in.nextInt();

        if (n == 3) {
            out.println(1);
            out.print(3);
        }

        if (n == 5) {
            out.println(1);
            out.print(5);
        }

        int k = (n + 1) / 2;

        for (int i = 3; i <= k; i++) {
            if (isPrime(i)) {
                int t = (n - i) / 2;

                if (isPrime(t)) {
                    out.println(3);
                    out.print(i + " " + t + " " + t);
                    return;
                }
            }
        }
    }

    public static boolean isPrime(int n) {
        if (primes.contains(n)) {
            return true;
        }

        if (n == 2) {
            return true;
        }

        if (n <= 1 || n % 2 == 0) {
            return false;
        }

        for (int i = 3; i * i <= n; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }

        primes.add(n);

        return true;
    }

    static class InputReader {
        public BufferedReader br;
        public StringTokenizer st;

        public InputReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

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

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.util.Scanner;

public class DD {
	public static void main(String[] args) {
		Scanner sanat = new Scanner(System.in);
		int n = sanat.nextInt();
		if(isprime(n)){
			System.out.println("1");
			System.out.println(n);
			return;
		}
		int m = 3000006;
		boolean []prime = new boolean[m];
		prime[1] = true;
		for (int i = 2; i < m; i++) {
			if(!prime[i]){
				int k =2;
				while(k*i<m){
					prime[k*i]=true;
					k++;
				}
			}
		}
		int cnt = 0;
		int []primes = new int[m];
		for (int i = 2; i <m; i++) {
			if(!prime[i]){
				primes[++cnt]=i;
			}
		}
		for (int i = 1; i <= cnt; i++) {
			int s = (n-primes[i])/2;
			if(s%2==1 && isprime(s) ){
				System.out.println(3);
				System.out.print(primes[i]+" "+s+" "+s);
				return;
			}
		}

	}

	private static boolean isprime(int i) {
		for (int j = 2; j <= Math.sqrt(i); j++) {
			if(i%j==0)
				return false;
		}
		return true;
	}
}

import java.util.Scanner;

public class DD {
	public static void main(String[] args) {
		Scanner sanat = new Scanner(System.in);
		int n = sanat.nextInt();
		if(isprime(n)){
			System.out.println("1");
			System.out.println(n);
			return;
		}
		if(isprime(n-2)){
			System.out.println("2");
			System.out.print("2"+" "+(n-2));
			return;
		}
		int m = 3000006;
		boolean []prime = new boolean[m];
		prime[1] = true;
		for (int i = 2; i < m; i++) {
			if(!prime[i]){
				int k =2;
				while(k*i<m){
					prime[k*i]=true;
					k++;
				}
			}
		}
		int cnt = 0;
		int []primes = new int[m];
		for (int i = 2; i <m; i++) {
			if(!prime[i]){
				primes[++cnt]=i;
			}
		}
		for (int i = 1; i <= cnt; i++) {

			int s = (n-primes[i])/2;
			if(s%2==1 && isprime(s) ){
				System.out.println(3);
				System.out.print(primes[i]+" "+s+" "+s);
				return;
			}
		}

	}

	private static boolean isprime(int i) {
		for (int j = 2; j <= Math.sqrt(i); j++) {
			if(i%j==0)
				return false;
		}
		return true;
	}
}

import java.util.Scanner;

public class DimaAndLisa
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		if(isPrime(n))
		{
			System.out.println(1);
			System.out.println(n);
		}
		else
		{
			if(n%2 != 0)
			{
				System.out.println(3);
				System.out.print(2 + " ");
				n -= 2;
			}
			else
				System.out.println(2);

			if(isPrime(n-2))
			{
				isPrime(n-2);
				System.out.print(2 + " ");
				System.out.print(n-2);
			}
			else
			for (int i = 3; i <= n/2; i+=2)
			{
				if(isPrime(i) && isPrime(n-i))
				{
					System.out.print(i + " ");
					System.out.println(n-i);
					return;
				}
			}
		}
	}

	static boolean isPrime(int n) {
	    if(n < 2) return false;
	    if(n == 2 || n == 3) return true;
	    if(n%2 == 0 || n%3 == 0) return false;
	    int sqrtN = (int)Math.sqrt(n)+1;
	    for(int i = 6; i <= sqrtN; i += 6) {
	        if(n%(i-1) == 0 || n%(i+1) == 0) return false;
	    }
	    return true;
	}
}

import java.io.PrintWriter;
import java.util.Scanner;

public class pr584D {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        solve(n, out);
        out.flush();
        out.close();
    }

    private static void solve(int n, PrintWriter out) {
        if (isPrime(n)) {
            out.println(1);
            out.println(n);
            return;
        }
        for(int i = n - 2; i > 0 ; i--) {
            if(isPrime(i)) {
                if(n - i == 2) {
                    out.println(2);
                    out.print(2 + " " + i);
                }
                else {
                    out.println(3);
                    int p = n - i;
                    for (int j = 2; j < p - 1; j++){
                        if(isPrime(j) && isPrime(p - j)){
                            out.println(i + " " + (p-j) + " " + j);
                            return;
                        }
                    }
                }
            }
        }
    }

    private static boolean isPrime(int n) {
        for(int i = 2; i <= Math.round(Math.sqrt(n)); i++) {
            if(n % i == 0) return false;
        }
        return true;
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

/*
 * Target : Tshirt in a major programming competition.
 */
public class Main implements Runnable {

	int mod = 998244353;
	int mod2 = mod;
	int sz[];
	int id[];
	int tree[];

	void test() throws IOException {
		Random rnd = new Random();
	}

	private void solve() throws IOException {
		int n = nextInt();
		boolean sieve[] = new boolean[(int) 1e5 + 1];
		Arrays.fill(sieve, true);
		sieve[0] = false;
		sieve[1] = false;
		for (int i = 2; i * i <= n; ++i) {
			if (sieve[i])
				for (int j = i * i; j <= n; j += i)
					sieve[j] = false;
		}
		if (sieve[n]) {
			System.err.println(1);
			System.err.println(n);
		} else {
			pw.println(3);
			int len = (int) 1e5;
			for (int i = 0; i <= len; ++i) {
				if (sieve[i]) {
					if (isPrime(n - 2 * i)) {
						pw.println(i + " " + i + " " + (n - 2 * i));
						return;
					}
				}
			}
		}

	}

	boolean isPrime(int n) {
		for (int i = 3; i * i <= n; i += 2) {
			if (n % i == 0)
				return false;
		}
		return true;
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter pw;

	public static void main(String args[]) {
		new Main().run();
	}

	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			pw = new PrintWriter(System.out);
			st = null;
			solve();
			pw.flush();
			pw.close();
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

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

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

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

	String next() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(br.readLine());
		}
		return st.nextToken();
	}
}

/*Author: Satyajeet Singh, Delhi Technological University*/
    import java.io.*;
    import java.util.*;
    import java.text.*;
    import java.lang.*;
    import java.math.*;

public class Main{
/*********************************************Constants******************************************/
    static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static long mod=(long)1e9+7;
    static long mod1=998244353;
    static boolean sieve[];
    static ArrayList<Integer> primes;
    static ArrayList<Long> factorial;
    static HashSet<Pair> graph[];
/****************************************Solutions Begins***************************************/
    static boolean isPrime(long x){
        if(x==2)return true;
        if(x%2==0||x==1)return false;
        for(int i=3;i*i<=x;i+=2){
            if(x%i==0)return false;
        }
        return true;
    }
    public static void main (String[] args) throws Exception {
        String st[]=br.readLine().split(" ");
        long a=Long.parseLong(st[0]);
        ArrayList<Long> list=new ArrayList<>();
        if(isPrime(a)){
            list.add(a);
        }
        else{
            for(long i=a;i>=a-500;i--){
                if(isPrime(i)){
                    list.add(i);
                    a-=i;
                    break;
                }
            }
            if(isPrime(a)){
                list.add(a);
            }
            else{
                for(long i=2;i<=a;i++){
                    if(isPrime(i)&&isPrime(a-i)){
                        list.add(i);
                        list.add(a-i);
                    }
                }
            }
        }
        out.println(list.size());
        for(long u:list){
            out.print(u+" ");
        }
/****************************************Solutions Ends**************************************************/
        out.flush();
        out.close();
    }
/****************************************Template Begins************************************************/
/***************************************Precision Printing**********************************************/
    static void printPrecision(double d){
        DecimalFormat ft = new DecimalFormat("0.00000000000000000");
        out.println(ft.format(d));
    }
/**************************************Bit Manipulation**************************************************/
    static void printMask(int mask){
        System.out.println(Integer.toBinaryString(mask));
    }
/******************************************Graph*********************************************************/
    static void Makegraph(int n){
        graph=new HashSet[n];
        for(int i=0;i<n;i++){
            graph[i]=new HashSet<>();
        }
    }
    static void addEdge(int a,int b,int c){
        graph[a].add(new Pair(b,c));
    }
/*********************************************PAIR********************************************************/
    static class PairComp implements Comparator<Pair>{
        public int compare(Pair p1,Pair p2){
            if(p1.u!=p2.u){
                return p1.u-p2.u;
            }
            else{
                return p1.v-p2.v;
            }
        }
    }
    static class Pair implements Comparable<Pair> {
        int u;
        int v;
        int index=-1;
        public Pair(int u, int v) {
            this.u = u;
            this.v = v;
        }

        public int hashCode() {
            int hu = (int) (u ^ (u >>> 32));
            int hv = (int) (v ^ (v >>> 32));
            return 31 * hu + hv;
        }

        public boolean equals(Object o) {
            Pair other = (Pair) o;
            return u == other.u && v == other.v;
        }

        public int compareTo(Pair other) {
            if(index!=other.index)
                return Long.compare(index, other.index);
            return Long.compare(v, other.v)!=0?Long.compare(v, other.v):Long.compare(u, other.u);
        }

        public String toString() {
            return "[u=" + u + ", v=" + v + "]";
        }
    }
/******************************************Long Pair*************************************************/
    static class PairCompL implements Comparator<Pairl>{
        public int compare(Pairl p1,Pairl p2){
            long aa=p2.u-p1.u;
            if(aa<0){
                return -1;
            }
            else if(aa>0){
                return 1;
            }
            else{
                return 0;
            }
        }
    }
    static class Pairl implements Comparable<Pair> {
            long u;
            long v;
            int index=-1;
            public Pairl(long u, long v) {
                this.u = u;
                this.v = v;
            }

            public int hashCode() {
                int hu = (int) (u ^ (u >>> 32));
                int hv = (int) (v ^ (v >>> 32));
                return 31 * hu + hv;
            }

            public boolean equals(Object o) {
                Pair other = (Pair) o;
                return u == other.u && v == other.v;
            }

            public int compareTo(Pair other) {
                if(index!=other.index)
                    return Long.compare(index, other.index);
                return Long.compare(v, other.v)!=0?Long.compare(v, other.v):Long.compare(u, other.u);
            }

            public String toString() {
                return "[u=" + u + ", v=" + v + "]";
            }
        }
/*****************************************DEBUG***********************************************************/
    public static void debug(Object... o) {
        System.out.println(Arrays.deepToString(o));
    }
/************************************MODULAR EXPONENTIATION***********************************************/
    static long modulo(long a,long b,long c) {
        long x=1;
        long y=a;
        while(b > 0){
            if(b%2 == 1){
                x=(x*y)%c;
            }
            y = (y*y)%c; // squaring the base
            b /= 2;
        }
        return  x%c;
    }
/********************************************GCD**********************************************************/
    static long gcd(long x, long y)
    {
        if(x==0)
            return y;
        if(y==0)
            return x;
        long r=0, a, b;
        a = (x > y) ? x : y; // a is greater number
        b = (x < y) ? x : y; // b is smaller number
        r = b;
        while(a % b != 0)
        {
            r = a % b;
            a = b;
            b = r;
        }
        return r;
    }
/******************************************SIEVE**********************************************************/
    static void sieveMake(int n){
        sieve=new boolean[n];
        Arrays.fill(sieve,true);
        sieve[0]=false;
        sieve[1]=false;
        for(int i=2;i*i<n;i++){
            if(sieve[i]){
                for(int j=i*i;j<n;j+=i){
                    sieve[j]=false;
                }
            }
        }
        primes=new ArrayList<Integer>();
        for(int i=0;i<n;i++){
            if(sieve[i]){
                primes.add(i);
            }
        }
    }
/********************************************End***********************************************************/
}

import java.io.*;
import java.util.StringTokenizer;

public class Main {

    static MyScanner in;
    static PrintWriter out;
    //static Timer t = new Timer();

    public static void main(String[] args) throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out, true);

        int n = in.nextInt();

        int s1 = n - 2;
        while (!isPrime(s1))
            s1--;

        int left = n - s1;
        for (int i = 1; i < left; i++)
            if (isPrime(i) && isPrime(left - i)) {
                out.println("3\n" + s1 + " " + i + " " + (left - i));
                return;
            }
    }

    static boolean isPrime(int n) {
        int sqrt = (int) Math.sqrt(n) + 1;
        for (int i = 2; i < sqrt; i++)
            if (n % i == 0)
                return false;
        return true;
    }

}

class MyScanner {

    private final BufferedReader br;
    private StringTokenizer st;
    private String last;

    public MyScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    public MyScanner(String path) throws IOException {
        br = new BufferedReader(new FileReader(new File(path)));
        //br = new BufferedReader(new InputStreamReader(new FileInputStream(
        //new File(path)), "cp1251"));
    }

    String next() throws IOException {
        while (st == null || !st.hasMoreElements())
            st = new StringTokenizer(br.readLine());
        last = null;
        return st.nextToken();
    }

    String nextLine() throws IOException {
        st = null;
        return (last == null) ? br.readLine() : last;
    }

    boolean hasNext() {
        if (st != null && st.hasMoreElements())
            return true;

        try {
            while (st == null || !st.hasMoreElements()) {
                last = br.readLine();
                st = new StringTokenizer(last);
            }
        } catch (Exception e) {
            return false;
        }

        return true;
    }

    String[] nextStrings(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = next();
        return arr;
    }

    String[] nextLines(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLine();
        return arr;
    }

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

    int[] nextInts(int n) throws IOException {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    Integer[] nextIntegers(int n) throws IOException {
        Integer[] arr = new Integer[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    int[][] next2Ints(int n, int m) throws IOException {
        int[][] arr = new int[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextInt();
        return arr;
    }

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

    long[] nextLongs(int n) throws IOException {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLong();
        return arr;
    }

    long[][] next2Longs(int n, int m) throws IOException {
        long[][] arr = new long[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextLong();
        return arr;
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next().replace(',', '.'));
    }

    double[] nextDoubles(int size) throws IOException {
        double[] arr = new double[size];
        for (int i = 0; i < size; i++)
            arr[i] = nextDouble();
        return arr;
    }

    boolean nextBool() throws IOException {
        String s = next();
        if (s.equalsIgnoreCase("true") || s.equals("1"))
            return true;

        if (s.equalsIgnoreCase("false") || s.equals("0"))
            return false;

        throw new IOException("Boolean expected, String found!");
    }
}

import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;

public class A {
	static long mod = 5000001;

	public static void main(String[] args) {

		Scanner nik = new Scanner(System.in);
		int n = nik.nextInt();

		boolean[] b = new boolean[10000001];
		Arrays.fill(b, true);
		b[0] = false;
		b[1] = false;
		for (int i = 2; i < b.length; i++) {
			if (b[i]) {
				int p = 2;

				while (p * i < b.length) {
					b[p * i] = false;
					p++;
				}
			}
		}
		HashSet<Integer> ht = new HashSet<>();
		for (int i = 2; i < b.length; i++) {
			if (b[i]) {
				ht.add(i);
			}
		}
		if (n == 3) {
			System.out.println(1 + "\n" + 3);
		} else {

			System.out.print(3 + "\n" + 3 + " ");
			n -= 3;

			for (int val : ht) {

				int temp = n - val;
				if (ht.contains(temp)) {
					System.out.print(val + " " + temp);
					break;
				}
			}
		}
	}

}

import java.util.Scanner;

public class Team4_Dima {

	public static int primes[] = new int[3402]; //3402 totals to 1000000000

	public static boolean isPrime (int n) {
		if (n <= 1) return false;
		if (n == 2) return true;
	    if (n%2 == 0) return false;
		int m = (int) Math.sqrt(n);
		for (int i = 3; i <= m; i += 2){
	        if (n % i == 0)
				return false;
	    }
	    return true;
	}

	public static void setup(){
		primes[0] = 2;
		primes[1] = 3;
		boolean breaker;
		int j;
		for(int i=5; i<Math.sqrt(1000000000); i+=2){
			breaker=false;
			j=0;
			while(primes[j]!=0 && !breaker){
				if(i%primes[j]==0){
					breaker=true;
				}
				j++;
			}
			if(!breaker){
				primes[j]=i;
			}
		}
	}

	public static void main(String args[]){

		setup();

		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		scanner.close();

		if(n==3){
			System.out.println("3");
			return;
		}
		else if(n==5){
			System.out.println("5");
			return;
		}

		n -= 3;

		for(int i=0; primes[i]<n; i++){
			if(isPrime(n-primes[i])){
				System.out.println("3 "+primes[i]+" "+(n-primes[i]));
				return;
			}
		}

	}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;

public class NumberTheory {

	static long n;
	static HashSet<Integer> h = new HashSet();
	static ArrayList<Integer> primes = new ArrayList();
	static boolean isPrime[] = new boolean[(int)(500+1)];
	static int N =  (500);
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	static long a;
	public static void sieve()
	{
		Arrays.fill(isPrime,true);

		for(int i = 2; i*i <= N ;i++)
		{
			if(isPrime[i])
			{
				for(int j = i*2 ; j <= N; j+=i)
				{
					isPrime[j] = false;
				}
			}
		}
		for(int i = 2 ; i <= N; i++){ if(isPrime[i]){
			primes.add(i);
			h.add(i);

		}
}
	}

static	boolean isPrime(long a)
	{
		for(long i = 2;i*i<=a;i++)
		{

			if(a%i==0) return false;
		}
		return true;
	}

	public static void main(String[]args)throws Throwable
	{
		a = new Long(br.readLine());
		long p1 = 0;
		sieve();

		for(long i = a ;i>0;i--)
		{
			if(isPrime(i))
			{
				p1 = i;

				break;
			}

		}

		long rem = a - p1;

		if(rem==0)
		{
			System.out.println("1\n"+p1);
			return;
		}

		if(h.contains(rem))
		{
			System.out.println("2\n"+" "+(p1)+" "+(rem));
			return;

		}

	      int sz = primes.size();
	      for(int i=0;i<sz;i++)
	      {
	          for(int j=0;j<sz;j++)
	          {
	              if(primes.get(i)+primes.get(j)==rem){

	                  System.out.println("3\n"+p1 +" "+primes.get(i)+" "+primes.get(j));

	           return;
	              }
	          }
	      }
		}

}

//swap(arr,i,j)
//HashMap sortByValue(map);
//long comb=nCr(5,2);
//int gcd(s,l);
//Pair p=new Pair(x,y);

import java.util.*;
import java.io.*;

public class Codeforces {

    InputStream is;
    PrintWriter out;
    String INPUT = "";

//----------------------------------------------------------------------------------------------------//
   boolean isPrime(int n){
       if(n==0||n==1)return false;
       for (int i = 2; i <= (int)Math.sqrt(n); i++) {
           if(n%i==0)return false;
       }
       return true;
   }

    void solve() {
        int n=ni();
        if(isPrime(n)){
            out.println(1);
            out.println(n);
        }
         if(n%3==0&&isPrime(n)){
            int x=n/3;
            out.println(x+" "+x+" "+x);
        }
        else{
            int x=n;
            int p1=0;
            for (int i = n; i >=2; i=i-2) {
                if(isPrime(i)){
                    p1=i;
                    break;
                }
            }
            int p2=n-p1;
            for (int i = 2; i <= p2; i++) {
                if(isPrime(i)&&isPrime(p2-i)){
                    out.println(3);
                    out.println(p1+" "+i+" "+(p2-i));
                    break;
                }
            }

        }

    }

//----------------------------------------------------------------------------------------------------//

    void swap(int a[], int l, int r) {
        int temp = a[l];
        a[l] = a[r];
        a[r] = temp;
    }

    long nCr(int n, int k) {
        long C[] = new long[k + 1];
        // nC0 is 1
        C[0] = 1;
        for (int i = 1; i <= n; i++) {
            for (int j = Math.min(i, k); j > 0; j--) {
                C[j] = C[j] + C[j - 1];
            }
        }
        return C[k];
    }

    public int gcd(int s, int l) {
        if (s == 0) {
            return l;
        }

        return gcd(l % s, s);
    }

    public HashMap<Integer, Integer> sortByValue(HashMap<Integer, Integer> hm) {
        // Create a list from elements of HashMap
        List<Map.Entry<Integer, Integer>> list
                = new LinkedList<>(hm.entrySet());

        //->change o1,o2 for reverseorder
        Collections.sort(list, (Map.Entry<Integer, Integer> o1, Map.Entry<Integer, Integer> o2) -> (o1.getValue()).compareTo(o2.getValue()));

        // put data from sorted list to hashmap
        HashMap<Integer, Integer> temp = new LinkedHashMap<>();
        list.forEach((aa) -> {
            temp.put(aa.getKey(), aa.getValue());
        });
        return temp;
    }

    void run() throws Exception {
        is = System.in;//oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);

        long s = System.currentTimeMillis();
        solve();
        out.flush();
        tr(System.currentTimeMillis() - s + "ms");
    }

    public static void main(String[] args) throws Exception {
        new Codeforces().run();
    }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if (lenbuf == -1) {
            throw new InputMismatchException();
        }
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) {
                return -1;
            }
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b));
        return b;
    }

    private double nd() {
        return Double.parseDouble(ns());
    }

    private char nc() {
        return (char) skip();
    }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for (int i = 0; i < n; i++) {
            map[i] = ns(m);
        }
        return map;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = ni();
        }
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

    private void tr(Object... o) {
        if (!oj) {
            System.out.println(Arrays.deepToString(o));

        }
    }

    class Pair {

        /*SORTING PAIRS BY COMPARING Y OF PAIR.
    Pair[] p=new Pair[n];
    p[i]=new Pair(i,ni());
    Arrays.sort(p,( p1, p2) -> {return p1.y-p2.y;});
         */
        int x;
        int y;

        Pair(int u, int v) {
            x = u;
            y = v;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (!(o instanceof Pair)) {
                return false;
            }
            Pair key = (Pair) o;
            return x == key.x && y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }
}

import java.io.*;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;

/**
 * Created by WiNDWAY on 4/18/16.
 */

public class Codeforces_round_324_div_2_DimaAndLisa {

    public static HashSet<Integer> set = new HashSet<>();
    public static void main(String[] args) {
        FScanner input = new FScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out), true);
        int n = input.nextInt();
        if(isPrime(n)) {
            out.println(1);
            out.println(n);
            System.exit(0);
        }
        sieve(n / 2);
        for(int x : set) {
            int remain = n - x;
            if(set.contains(remain / 2)) {
                out.println(3);
                out.println(remain + " " + remain + " " + x);
                System.exit(0);
            }
        }
        out.close();
    }

    public static boolean isPrime(int n) {
        if (n <= 1) {
            return false;
        }
        if (n <= 3) {
            return true;
        }

        if (n % 2 == 0 || n % 3 == 0) {
            return false;
        }

        for (int i = 5; i * i <= n; i = i + 6) {
            if (n % i == 0 || n % (i + 2) == 0) {
                return false;
            }
        }
        return true;
    }

    public static void sieve(int n) {
        boolean prime[] = new boolean[n + 1];
        Arrays.fill(prime, true);

        for (int p = 2; p * p <= n; p++) {
            if (prime[p]) {
                for (int i = p * 2; i <= n; i += p) {
                    prime[i] = false;
                }
            }
        }

        for (int p = 2; p <= n; p++) {
            if (prime[p]) {
                set.add(p);
            }
        }
    }

    public static PrintWriter out;

    public static class FScanner {
        BufferedReader br;
        StringTokenizer st;

        public FScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}

//package CodeForces.Round324;

import java.util.*;

/**
 * Created by Ilya Sergeev on 09.10.2015.
 */
public class EDimaLiza {
    public static boolean[] fillSieve(int n){
        boolean[] primes=new boolean[n+1];
        Arrays.fill(primes, true);
        primes[0] = primes[1] = false;
        for (int i = 2; i < primes.length; i++) {
            if (primes[i]) {
                for (int j=2;i*j<primes.length;j++) {
                    primes[i*j]=false;
                }
            }
        }
        return primes;
    }

    public static LinkedList<Integer> count(List<Integer> primes, int n){
        LinkedList<Integer> list = new LinkedList<>();
        int[] ost = new int[n];
        for (int i = 0; i < ost.length; i++) {
            ost[i] = -1;
        }
        for (int i = 0; i < primes.size(); i++) {
            if(n == primes.get(i)*3){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(primes.get(i));
                return list;
            }
            ost[n - primes.get(i)] = primes.get(i);
        }
        for (int i = 0; i < primes.size(); i++) {
            int c = primes.get(i)*2;
            if(n > c && ost[c] != -1){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(ost[c]);
                return list;
            }
        }
        return null;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] b = fillSieve(n-1);
        List<Integer> primes = new ArrayList<>();
        for (int i = 0; i < b.length; i++) {
            if(b[i]) primes.add(i);
        }

        for (Integer integer : count(primes, n)) {
            System.out.print(integer + " ");
        }
    }
}

import java.util.Scanner;

public class Main
{
    private static boolean isPrime(int x)
    {
        double d = Math.sqrt((double) x);
        int s = (int) d;
        for (int i = 2; i <= s; i++)
        {
            if (x % i == 0)
            {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        int n = Integer.parseInt(s1);
        int a = 0, b = 0;
        int k = 0;
        int res = 0;
        if (isPrime(n))
        {
            res = n;
            k = 1;
            System.out.println(k);
            System.out.println(res);
            return;
        }
        if (n == 4)
        {
            System.out.println(2);
            System.out.println(2 + " " + 2);
            return;
        }
        if (n == 6)
        {
            System.out.println(2);
            System.out.println(3 + " " + 3);
            return;
        }
        int t = n - 5;
        double d = Math.sqrt((double) t);
        int s = (int) d;

        for (int i = 2; i <= s; i++)
        {
            if (isPrime(i) && isPrime(t - i))
            {
                a = i;
                b = t - i;
                System.out.println(3);
                System.out.println(5 + " " + a + " " + b);
                return;
            }
        }

    }
}
// if (isPrime(n))
// {
// res = n;
// k = 1;
// System.out.println(k);
// System.out.println(res);
// return;
// }
//
// if (a == 0 && b == 0)
// {
// int x = n - 5;
// for (int i = 2; i <= x / 2; i++)
// {
// if (isPrime(i) && isPrime(x - i))
// {
// a = i;
// b = x - i;
// }
// }
// System.out.println(3);
// System.out.println(5 + " " + a + " " + b);
// return;
// }
// if (res == 0)
// {
// for (int i = 2; i <= n / 2; i++)
// {
// if (isPrime(i) && isPrime(n - i))
// {
// a = i;
// b = n - i;
// }
// }
// System.out.println(2);
// System.out.println(a + " " + b);
// return;
// }

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static InputStream is = System.in;
    public static BufferedReader br = new BufferedReader(new InputStreamReader(is));
    public static StringTokenizer stok;

    public static String next() {
        String nxt;
        try {
            if (stok != null && stok.hasMoreElements()) return stok.nextToken();
            if ((nxt = br.readLine()) != null) {
                stok = new StringTokenizer(nxt);
                if (stok.hasMoreElements()) return stok.nextToken();
            } else return null;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public static Integer nextInt() {
        return Integer.valueOf(next());
    }

    public static boolean isPrime(int k) {
        for (int i = 2; i * i < k; i++) {
            if (k % i == 0) return false;
        }
        return true;
    }

    public static void main(String[] args) {
        int n = nextInt();
        if (isPrime(n)) {
            System.out.println(1 + " " + n);
            return;
        }
        int p = n - 1;
        for (int i = n; i > 1; i--) {
            if (isPrime(i)) {
                p = i;
            }
        }
        int t = n - p;
        if (isPrime(t)) {
            System.out.println(2 + " " + t + " " + p);
            return;
        }
        for (int i = 2; i < t; i++) {
            for (int j = 2; j < t; j++) {
                if (i != j && i != p && isPrime(i) && isPrime(j) && i + j + p == n) {
                    System.out.println(3 + " " + i + " " + j + " " + p);
                    return;
                }
            }
        }
    }
}

import java.util.Scanner;
//codeforces round 324 div2 question D
// Author: Anshuman Srivastava
public class prime
{
    public static void main(String args[])
    {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int k = 0;
    long[] outputs = new long[3];
    //input output sturcture ready
     if(isPrime(n))
        {
        k=1;
        outputs[0] = n;
        }
    else
        {
        // using Goldbatch Conjecture that an even number
        //can always be represented as a sum of two primes
        long m = n-2;
        while(!isPrime(m))
            {
            m= m-2;
            }
        long l = n-m;

        if(isPrime(l))
            {
            k=2;
            outputs[0]  = m;
            outputs[1] = l;
            }
        else
            {
            k=3;
            long x = l-3;
            long y = 3;
            while(!(isPrime(x)&&isPrime(y)))
                {
                x= x-2;
                y=y+2;
                }
            outputs[0] = m;
            outputs[1] = x;
            outputs[2] = y;
            }

        }

    // output stream
    System.out.println(k);
    for(int i=0;i<k;i++)
        {
        System.out.print(outputs[i]+" ");
        }

    }
    public static boolean isPrime(long n)
    {
    if(n==2) return true;
    else if(n==1) return false;
    long j =(long)Math.sqrt(n)+1;

    if(n%2==0) return false;
    for(int i=3;i<j;i=i+2)
        {
        if(n%i==0) return false;
        }
    return true;
    }
}

import java.io.*;
import java.util.*;
public class Solution {
	static Scanner sc=new Scanner(System.in);
	static PrintWriter out=new PrintWriter(System.out);
	//Main Method
	static boolean isPrime(long x) {
		for(long i=2;i*i<=x;i++) if(x%i==0) return false;
		return true;
	}
	static int N=1000000,sieve[]=new int[N+1];
	public static void main(String args[]) {
		sieve[0]=1;
		sieve[1]=1;
		for(int i=2;i*i<=N;i++) {
			if(sieve[i]==0) {
				for(int j=i*i;j<=N;j+=i) sieve[j]=1;
			}
		}
		int test=1;
		while(test-->0) {
			long n=sc.nextLong();
			if(n<=5) {
				out.println(n);
				continue;
			}
			long val=3;
			for(long i=n-4;;i-=2) {
				if(isPrime(i)) {
					val=i;
					break;
				}
			}
			n-=val;
			long x=val,y=-1,z=-1;
			for(int i=2;i<=n;i++) {
				if(sieve[i]==0 && sieve[(int)(n-i)]==0) {
					y=i;
					z=n-i;
				}
			}
			out.println(3);
			out.println(x+" "+y+" "+z);
		}
		out.flush();
		out.close();
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Morgrey
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            if (IntegerUtils.isPrime(n)) {
                out.printLine(1);
                out.printLine(n);
                return;
            }
            boolean flag = true;
            if (n % 2 != 0) {
                n -= 3;
            }
            for (int i = 2; i < 1000000; ++i)
                if (IntegerUtils.isPrime(i) && IntegerUtils.isPrime(n - 1)) {
                    if (flag) {
                        out.printLine(3);
                        out.printLine(3 + " " + i + " " + (n - i));
                        return;
                    } else {
                        out.printLine(2);
                        out.printLine(i + " " + (n - i));
                        return;
                    }
                }
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void printLine(int i) {
            writer.println(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class IntegerUtils {
        public static boolean isPrime(long number) {
            if (number < 2)
                return false;
            for (long i = 2; i * i <= number; i++) {
                if (number % i == 0)
                    return false;
            }
            return true;
        }

    }
}

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static InputStream is = System.in;
    public static BufferedReader br = new BufferedReader(new InputStreamReader(is));
    public static StringTokenizer stok;

    public static String next() {
        String nxt;
        try {
            if (stok != null && stok.hasMoreElements()) return stok.nextToken();
            if ((nxt = br.readLine()) != null) {
                stok = new StringTokenizer(nxt);
                if (stok.hasMoreElements()) return stok.nextToken();
            } else return null;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public static Integer nextInt() {
        return Integer.valueOf(next());
    }

    public static boolean isPrime(int k) {
        for (int i = 2; i * i < k; i++) {
            if (k % i == 0) return false;
        }
        return true;
    }

    public static void main(String[] args) {
        int n = nextInt();
        int p = n - 1;
        for (int i = n; i > 0; i--) {
            if (isPrime(i)) {
                p = i;
            }
        }
        int t = n - p;
        for (int i = 1; i < t; i++) {
            for (int j = 1; j < t; j++) {
                if (i != j && i != p && isPrime(i) && isPrime(j) && i + j + p == n) {
                    System.out.println(i + " " + j + " " + p);
                    return;
                }
            }
        }
    }
}

import java.io.*;
import java.util.*;

public class d1 {
	BufferedReader br;
	StringTokenizer in;
	PrintWriter out;

	public String nextToken() throws IOException {
		while (in == null || !in.hasMoreTokens()) {
			in = new StringTokenizer(br.readLine());
		}
		return in.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public static void main(String[] args) throws IOException {
		new d1().run();
	}

	public void solve() throws IOException {

		int n = nextInt();

		boolean flag = false;

		for (int i = 2; i <= Math.sqrt(n); i++) {
			if (n % i != 0) {
				flag = true;
				break;
			}
		}

		TreeSet<Integer> q = new TreeSet();
		TreeSet<Integer> p = new TreeSet();

		q.add(1);

		for (int i = 1; i < 10000; i++) {
			if (!q.contains(i)) {
				p.add(i);

				for (int j = 2; j <= 10000 / i; j++) {
					q.add(j * i);
				}
			}
		}

		if (!flag) {
			out.println(1);
			out.println(n);
		} else {
			int t = n - 2;

			flag = false;

			for (int i = 2; i <= Math.sqrt(t); i++) {
				if (t % i != 0) {
					flag = true;
					break;
				}
			}

			if (!flag){
				out.println(2);
				out.print(2 + " " + (n - 2));
			}
			else{
				t = n - 4;

				flag = false;

				for (int i = 2; i <= Math.sqrt(t); i++) {
					if (t % i != 0) {
						flag = true;
						break;
					}
				}
				out.println(3);

				if (!flag){
					out.print(2 + " " + 2 + " " + t);
				}
				else{
					boolean fl = false;

					for (int i : p) {
						for (int j : p) {
							if (i + j < n){
								t = n - i - j;

								flag = false;

								for (int k = 2; k <= Math.sqrt(t); k++) {
									if (t % k != 0) {
										flag = true;
										break;
									}
								}

								if (!flag){
									out.print(i + " " + j + " " + t);
									fl = true;
									break;
								}
							}
						}

						if (fl){
							break;
						}
					}
				}
			}
		}
	}

	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			solve();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}
}

import java.util.Scanner;

public class DD {
	public static void main(String[] args) {
		Scanner sanat = new Scanner(System.in);
		int n = sanat.nextInt();
		if(isprime(n)){
			System.out.println("1");
			System.out.println(n);
			return;
		}
		if(isprime(n-2)){
			System.out.println("2");
			System.out.print("2"+" "+(n-2));
			return;
		}
		int m = 3000006;
		boolean []prime = new boolean[m];
		prime[1] = true;
		for (int i = 2; i < m; i++) {
			if(!prime[i]){
				int k =2;
				while(k*i<m){
					prime[k*i]=true;
					k++;
				}
			}
		}
		int cnt = 0;
		int []primes = new int[m];
		for (int i = 2; i <m; i++) {
			if(!prime[i]){
				primes[++cnt]=i;
			}
		}
		for (int i = 1; i <= cnt; i++) {

			int s = (n-primes[i])/2;
			if(s%2==1 && isprime(s) ){
				System.out.println(3);
				System.out.print(primes[i]+" "+s+" "+s);
				return;
			}
		}

	}

	private static boolean isprime(int i) {
		for (int j = 2; j <= Math.sqrt(i); j++) {
			if(i%j==0)
				return false;
		}
		return true;
	}
}

import java.util.Scanner;

public class hyopoth {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		if (Prime(n)) {
			System.out.println(1 + "\n" + n);

		} else if (Prime(n - 2)) {
			System.out.println(2 + "\n" + "2 " + (n - 2));

		} else if (Prime(n - 4)) {
			System.out.println(3 + "\n" + "2 2 " + (n - 4));
		} else if (Prime(n - 6))
			System.out.println(3 + "\n" + "3 3 " + (n - 6));
		else if (Prime(n - 8))
			System.out.println(3 + "\n" + "3 5 " + (n - 8));
		else if (Prime(n - 10))
			System.out.println(3 + "\n" + "5 5 " + (n - 10));

	}

	public static boolean Prime(int n) {
		if (n < 1)
			return false;
		if (n % 2 == 0)
			return n == 2;
		for (int i = 3; i <= Math.sqrt(n); i += 2) {
			if (n % i == 0)
				return false;
		}
		return true;
	}

}

import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.StringTokenizer;

/**
 * Created by WiNDWAY on 4/18/16.
 */

public class Codeforces_round_324_div_2_DimaAndLisa {

    public static ArrayList<Integer> list = new ArrayList<>();
    public static void main(String[] args) {
        FScanner input = new FScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out), true);
        int n = input.nextInt();
        if(isPrime(n)) {
            out.println(1);
            out.println(n);
            out.close();
            System.exit(0);
        }
        sieve(n / 2);
        for (int i = list.size() - 1; i >= 0; i--) {
            for (int j = 0; j < list.size(); j++) {
                int first = list.get(i);
                int second = list.get(j);
                if(first + second == n) {
                    out.println(2);
                    out.println(first + " " + second);
                    out.close();
                    System.exit(0);
                }
                int remain = n - first - second;
                if(Collections.binarySearch(list, remain) >= 0) {
                    out.println(3);
                    out.println(remain + " " + first + " " + second);
                    out.close();
                    System.exit(0);
                }

            }
        }
    }

    public static boolean isPrime(int n) {
        if (n <= 1) {
            return false;
        }
        if (n <= 3) {
            return true;
        }

        if (n % 2 == 0 || n % 3 == 0) {
            return false;
        }

        for (int i = 5; i * i <= n; i = i + 6) {
            if (n % i == 0 || n % (i + 2) == 0) {
                return false;
            }
        }
        return true;
    }

    public static void sieve(int n) {
        boolean prime[] = new boolean[n + 1];
        Arrays.fill(prime, true);

        for (int p = 2; p * p <= n; p++) {
            if (prime[p]) {
                for (int i = p * 2; i <= n; i += p) {
                    prime[i] = false;
                }
            }
        }

        for (int p = n; p >= 2; p--) {
            if (prime[p]) {
                list.add(p);
            }
        }
    }

    public static PrintWriter out;

    public static class FScanner {
        BufferedReader br;
        StringTokenizer st;

        public FScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static int n;
    static HashSet<Integer> h;

    public static boolean isPrime(int n) {
        if (h.contains(n))
            return true;
        if (n == 3 || n == 2)
            return true;
        if (n % 3 == 0 || n % 2 == 0 || n == 1)
            return false;
        int root = (int) Math.ceil(Math.sqrt(n));
        for (int i = 5, j = 7; i <= root || j <= root; i += 6, j += 6)
            if (n % i == 0 || n % j == 0)
                return false;
        h.add(n);
        return true;
    }

    public static void main(String[] args) throws IOException {
        FastPrinter out = new FastPrinter(System.out);
        InputReader in = new InputReader(System.in);
        n = in.nextInt();
        h = new HashSet<Integer>();
        if (isPrime(n)) {
            out.println("1\n" + n);
        } else {
            n -= 3;
            for (int i = 2; i < n / 2; i++)
                if (isPrime(i) && isPrime(n - i)) {
                    out.println("3\n" + 3 + " " + i + " " + (n - i));
                    break;
                }
        }
        out.close();
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }

    public int[] readIntArray(int n) {
        int[] ret = new int[n];
        for (int i = 0; i < n; i++)
            ret[i] = nextInt();
        return ret;
    }

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

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

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

    public BigInteger nextBigInt() {
        return new BigInteger(next());
    }

}

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }

}

import java.awt.Point;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.StringTokenizer;
import static java.lang.Math.*;
import java.util.Map;
import java.util.Scanner;

/**
 *
 * @author Mojtaba
 */
public class Main {

    static int[] from;

    public static void main(String[] args) throws IOException {
        MyScanner in = new MyScanner(System.in);
        PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out));
        StringBuilder sb = new StringBuilder("");

        int n = in.nextInt();
        search:
        {
            for (int i = 2; i < n; i++) {
                if (isPrime(i)) {
                    int nmi = n - i;
                    for (int j = 2; j < nmi; j++) {
                        if (isPrime(nmi - j) && isPrime(j)) {
                            sb.append(i).append(" ").append(nmi - j).append(" ").append(j);
                            break search;
                        }
                    }
                }
            }
        }

        //System.out.println(sb.toString().trim());
        writer.println(sb.toString().trim());
        writer.flush();
        in.close();
    }

    static void sort(int[] a) {
        Random rand = new Random();
        for (int i = a.length - 1; i > 0; i--) {
            int index = rand.nextInt(i + 1);
            // Simple swap
            int temp = a[index];
            a[index] = a[i];
            a[i] = temp;
        }
        Arrays.sort(a);
    }

    private static boolean isPrime(int n) {
        if (n < 2) {
            return false;
        }
        int lim = (int) sqrt(n);
        for (int i = 3; i <= lim; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }
}

class MyScanner {

    BufferedReader reader;
    StringTokenizer tokenizer;

    public MyScanner(InputStream stream) {
        this.reader = new BufferedReader(new InputStreamReader(stream));
    }

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

    public int[] nextIntegerArray(int n) throws IOException {
        int[] a = new int[n];
        for (int i = 0; i < a.length; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    public long[] nextLongArray(int n) throws IOException {
        long[] a = new long[n];
        for (int i = 0; i < a.length; i++) {
            a[i] = nextLong();
        }
        return a;
    }

    public int nextInt(int radix) throws IOException {
        return Integer.parseInt(next(), radix);
    }

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

    public long nextLong(int radix) throws IOException {
        return Long.parseLong(next(), radix);
    }

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

    public BigInteger nextBigInteger() throws IOException {
        return new BigInteger(next());
    }

    public BigInteger nextBigInteger(int radix) throws IOException {
        return new BigInteger(next(), radix);
    }

    public String next() throws IOException {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
            return this.next();
        }
        return tokenizer.nextToken();
    }

    public void close() throws IOException {
        this.reader.close();
    }
}

//package CodeForces.Round324;

import java.util.*;
import java.util.stream.LongStream;
import java.util.stream.Stream;

/**
 * Created by Ilya Sergeev on 09.10.2015.
 */
public class EDimaLiza {
/*
    public static boolean[] fillSieve(int n){
        boolean[] primes=new boolean[n+1];
        Arrays.fill(primes, true);
        primes[0] = primes[1] = false;
        for (int i = 2; i < primes.length; i++) {
            if (primes[i]) {
                for (int j=2;i*j<primes.length;j++) {
                    primes[i*j]=false;
                }
            }
        }
        return primes;
    }

    public static LinkedList<Integer> count(List<Integer> primes, int n){
        LinkedList<Integer> list = new LinkedList<>();
        int[] ost = new int[n];
        if(primes.contains(n)){
            list.push(n);
            return list;
        }
        for (int i = 0; i < ost.length; i++) {
            ost[i] = -1;
        }
        for (int i = 0; i < primes.size(); i++) {
            if(n == primes.get(i)*3){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(primes.get(i));
                return list;
            }
            ost[n - primes.get(i)] = primes.get(i);
        }
        for (int i = 0; i < primes.size(); i++) {
            int c = primes.get(i)*2;
            if(n > c && ost[c] != -1){
                list.push(primes.get(i));
                list.push(primes.get(i));
                list.push(ost[c]);
                return list;
            }
        }
        return null;
    }
*/
    public static boolean isPrime(long number){
        return number > 1 &&
                LongStream.range(2, (long) Math.sqrt(number))
                          .noneMatch(i -> number % i == 0);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        List<Long> list = new LinkedList<>();
        if(n > 300){
            long p = n - 300;
            Optional<Long> t = Stream.iterate(n-1, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(300)
                    .findAny();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i < n - list.get(0); i++) {
                    if(isPrime(i)){
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() > 1){
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
        else{
            Optional<Long> t = Stream.iterate(n, e -> e - 1)
                    .filter(EDimaLiza::isPrime)
                    .limit(n)
                    .findFirst();
            if(t.isPresent()){
                list.add(t.get());
                outer:
                for (int i = 0; i < n - list.get(0); i++) {
                    if(isPrime(i)){
                        for (int j = 0; j < n - list.get(0); j++) {
                            if(isPrime(j) && i+j == n - list.get(0)){
                                list.add((long) i);
                                list.add((long) j);
                                break outer;
                            }
                        }
                    }
                }
                if(list.size() > 1){
                    for (Long aLong : list) {
                        System.out.print(aLong + " ");
                    }
                }
                else System.out.println(-1);
            }
        }
    }
}

import java.util.Scanner;

public class DD {
public static void main(String[] args) {
	 Scanner sc=new  Scanner(System.in);
	 int n=sc.nextInt();
	 boolean []used=new boolean[100001];
	 	for (int i =2; i <=316; i++) {
			if(!used[i]){
				for (int j =2; j <=100000/i; j++) {
					used[i*j]=true;
				}
			}
		}
	 	int k=n;
	 	while(tubmi(k)){
	 		k--;
	 	}
	 	if(k==n){
	 		System.out.println("1");
	 		System.out.println(k);
	 	}else{
	 		if(!tubmi(k-2)){
	 			System.out.println("2");
	 			System.out.println(k-2+" "+"2");
	 		}else{
	 			System.out.println("3");
	 			System.out.print(k+" ");
	 			int h=n-k;
	 			for (int i =2; i <=100000; i++) {
					if(!used[i]&&!used[Math.abs(i-h)]){
						System.out.print(i+" "+Math.abs(i-h));break;
					}
				}
	 		}
	 	}
}

private static boolean tubmi(int k) {
		for (int i =2; i <=Math.sqrt(k); i++) {
			if(k%i==0)return true;
		}
	return false;
}
}

//package codeforces.FiveEightFour;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class TestD {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));

		String s;
		try {
			while ((s = reader.readLine()) != null) {
				int n = Integer.valueOf(s).intValue();
				System.out.println("-----------" + n);
				int a = priPrime(n-1);
				System.out.println("-----------" + a);
				int remain = n - a;
				int b = 0;
				int c = 0;
				boolean flag = true;
				for (; flag == true; a = priPrime(a)) {
					remain = n - a;
					for (b = 2; flag == true; b++) {
						c = n - a - b;
						if (isPrime(b) && isPrime(c)) {
							if (c == 0) {
								System.out.println("2");
								System.out.println(a + " " + b);
							} else {
								System.out.println("3");
								System.out.println(a + " " + b + " " + c);
							}
							flag = false;
						}
					}
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static int priPrime(int n) {
		while (!isPrime(n)) {
			n--;
		}
		return n;
	}

	public static boolean isPrime(int n) {
		int flag = (int) Math.sqrt(n);
		for (int i = 2; i <= flag; i++) {
			if (n % i == 0)
				return false;
		}
		return true;
	}

}

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static InputStream is = System.in;
    public static BufferedReader br = new BufferedReader(new InputStreamReader(is));
    public static StringTokenizer stok;

    public static String next() {
        String nxt;
        try {
            if (stok != null && stok.hasMoreElements()) return stok.nextToken();
            if ((nxt = br.readLine()) != null) {
                stok = new StringTokenizer(nxt);
                if (stok.hasMoreElements()) return stok.nextToken();
            } else return null;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public static Integer nextInt() {
        return Integer.valueOf(next());
    }

    public static boolean isPrime(int k) {
        for (int i = 2; i * i < k; i++) {
            if (k % i == 0) return false;
        }
        return true;
    }

    public static void main(String[] args) {
        int n = nextInt();
        if (isPrime(n)) {
            System.out.println(1 + " \n" + n);
            return;
        }
        int p = n - 1;
        for (int i = n; i > 1; i--) {
            if (isPrime(i)) {
                p = i;
            }
        }
        int t = n - p;
        if (isPrime(t)) {
            System.out.println(2 + " \n" + t + " " + p);
            return;
        }
        for (int i = 2; i < t; i++) {
            for (int j = 2; j < t; j++) {
                if (i != j && i != p && isPrime(i) && isPrime(j) && i + j + p == n) {
                    System.out.println(3 + " \n" + i + " " + j + " " + p);
                    return;
                }
            }
        }
    }
}

import java.util.Scanner;

/**
 * Created by nursultan on 10/11/15.
 */
public class Test101 {

    static boolean isPrime(int num) {
        if (num <= 1) {
            return false;
        }
        if (num == 2) {
            return true;
        }
        if (num % 2 == 0) {
            return false;
        }
        int m = (int) Math.sqrt(num);
        for (int i = 3; i <= m; i += 2) {
            if (num % i == 0)
                return false;
        }
        return true;
    }

    static void solve(int num) {
        if (num == 3 || num == 5) {
            System.out.println(1);
            System.out.println(num);
            return;
        }

        int mid = num / 2;
        int first = 0; int second = 0;
        int third = 0;

        for (int i = 0; i < num / 2; i++) {
            if (isPrime(mid) && isPrime(num - 2 * mid)){
                first = second = mid;
                third = num - 2 * mid;
            } else {
                mid --;
            }
        }

        System.out.println(first + " " + second + " " + third);

        //2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97
        // n = 27; 27 = 11 + 11 + 5
        // resheto na 27, 27 / 2 = 13 ; 27 mod 13 = 1 ; 1 is prime = false; 13 next lower prime -> = 11; 27 mod 11 = 5;
        // 27 div 11 = 2 mod(5) ;
        // 71 / 2 = 35 - > next nearest prime = 31; 71 div 31 = 2 mod (9)

    }

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        int num = in.nextInt();

        solve(num);
    }

}

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static InputStream is = System.in;
    public static BufferedReader br = new BufferedReader(new InputStreamReader(is));
    public static StringTokenizer stok;

    public static String next() {
        String nxt;
        try {
            if (stok != null && stok.hasMoreElements()) return stok.nextToken();
            if ((nxt = br.readLine()) != null) {
                stok = new StringTokenizer(nxt);
                if (stok.hasMoreElements()) return stok.nextToken();
            } else return null;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public static Integer nextInt() {
        return Integer.valueOf(next());
    }

    public static boolean isPrime(int k) {
        for (int i = 2; i * i <= k; i++) {
            if (k % i == 0) return false;
        }
        return true;
    }

    public static void main(String[] args) {
        int n = nextInt();
        if (isPrime(n)) {
            System.out.println(1 + " \n" + n);
            return;
        }
        int p = n - 1;
        for (int i = n; i > 1; i--) {
            if (isPrime(i)) {
                p = i;
            }
        }
        int t = n - p;
        if (isPrime(t)) {
            System.out.println(2 + " \n" + t + " " + p);
            return;
        }
        for (int i = 2; i < t; i++) {
            for (int j = 2; j < t; j++) {
                if (i != j && i != p && isPrime(i) && isPrime(j) && i + j + p == n) {
                    System.out.println(3 + " \n" + i + " " + j + " " + p);
                    return;
                }
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class D_Round_324_Div2 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        TreeSet<Integer> list = new TreeSet();
        boolean[] p = new boolean[10000001];
        for (int i = 2; i < p.length; i++) {
            if (!p[i]) {
                list.add(i);
                for (int j = i + i; j < p.length; j += i) {
                    p[j] = true;
                }
            }
        }
        if (n < p.length) {
            if (!p[n]) {
                out.println(1);
                out.println(n);
            } else {
                int v = list.floor(n);
                int left = n - v;
                for (int i : list) {
                    if (i > left) {
                        break;
                    }
                    if (list.contains(left - i)) {
                        out.println(3);
                        out.println(v + " " + (left - i) + " " + i);
                        break;
                    }
                }

            }
        } else {
            while (true) {
                BigInteger tmp = BigInteger.valueOf(n - 1000);
                BigInteger v = tmp.nextProbablePrime();
                if (v.isProbablePrime(60)) {
                    int left = n - v.intValue();

                    for (int i : list) {
                        if (i > left) {
                            break;
                        }
                        if (list.contains(left - i)) {
                            out.println(3);
                            out.println(v + " " + (left - i) + " " + i);
                            break;
                        }
                    }
                    break;
                }

            }

        }

        out.close();
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    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 int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

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

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

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

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

        }
    }

    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("input.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();
            }
        }
    }
}

import java.util.Arrays;
import java.util.Scanner;

public class MainD {
	MyScanner sc = new MyScanner();
	Scanner sc2 = new Scanner(System.in);
	long start = System.currentTimeMillis();
	long fin = System.currentTimeMillis();
	final int MOD = 1000000007;
	int[] dx = { 1, 0, 0, -1 };
	int[] dy = { 0, 1, -1, 0 };

	void run() {
		int N = sc.nextInt();

		// k = 1
		if (isPrime(N)) {
			System.out.println(1);
			System.out.println(N);
		} else {
			System.out.println(3);
			if (isPrime(N - 4)) {
				System.out.println(2 + " " + 2 + " " + (N - 4));
			} else {
				System.out.println(3 + " " + 3 + " " + (N - 6));
			}
		}
	}

	boolean isPrime(int N) {
		if (N <= 1)
			return false;
		for (int i = 2; i * i <= N; i++) {
			if (N % i == 0)
				return false;
		}
		return true;
	}

	public static void main(String[] args) {
		new MainD().run();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	void debug2(int[][] array) {
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				System.out.print(array[i][j]);
			}
			System.out.println();
		}
	}

	boolean inner(int h, int w, int limH, int limW) {
		return 0 <= h && h < limH && 0 <= w && w < limW;
	}

	void swap(int[] x, int a, int b) {
		int tmp = x[a];
		x[a] = x[b];
		x[b] = tmp;
	}

	// find minimum i (a[i] >= border)
	int lower_bound(int a[], int border) {
		int l = -1;
		int r = a.length;
		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (border <= a[mid]) {
				r = mid;
			} else {
				l = mid;
			}
		}
		// r = l + 1
		return r;
	}

	boolean palindrome(String s) {
		for (int i = 0; i < s.length() / 2; i++) {
			if (s.charAt(i) != s.charAt(s.length() - 1 - i)) {
				return false;
			}
		}
		return true;
	}

	class MyScanner {
		int nextInt() {
			try {
				int c = System.in.read();
				while (c != '-' && (c < '0' || '9' < c))
					c = System.in.read();
				if (c == '-')
					return -nextInt();
				int res = 0;
				do {
					res *= 10;
					res += c - '0';
					c = System.in.read();
				} while ('0' <= c && c <= '9');
				return res;
			} catch (Exception e) {
				return -1;
			}
		}

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

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

		String next() {
			try {
				StringBuilder res = new StringBuilder("");
				int c = System.in.read();
				while (Character.isWhitespace(c))
					c = System.in.read();
				do {
					res.append((char) c);
				} while (!Character.isWhitespace(c = System.in.read()));
				return res.toString();
			} catch (Exception e) {
				return null;
			}
		}

		int[] nextIntArray(int n) {
			int[] in = new int[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextInt();
			}
			return in;
		}

		int[][] nextInt2dArray(int n, int m) {
			int[][] in = new int[n][m];
			for (int i = 0; i < n; i++) {
				in[i] = nextIntArray(m);
			}
			return in;
		}

		double[] nextDoubleArray(int n) {
			double[] in = new double[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextDouble();
			}
			return in;
		}

		long[] nextLongArray(int n) {
			long[] in = new long[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextLong();
			}
			return in;
		}

		char[][] nextCharField(int n, int m) {
			char[][] in = new char[n][m];
			for (int i = 0; i < n; i++) {
				String s = sc.next();
				for (int j = 0; j < m; j++) {
					in[i][j] = s.charAt(j);
				}
			}
			return in;
		}
	}
}

import java.math.BigInteger;
import java.util.*;

/**
 * Created by smalex on 06/10/15.
 */
public class P584D {

  public static void main(String[] args) throws Exception {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    if (BigInteger.valueOf(n).isProbablePrime(1)) {
      System.out.println("1");
      System.out.println(n);
      return;
    }
    int N = 10000;
    boolean[] numbers = new boolean[N];
    Arrays.fill(numbers, true);
    numbers[0] = false;
    numbers[1] = true;
    for (int i = 2; i < N; i++) {
      if (!numbers[i]) {
        continue;
      }
      for (int j = i + i; j < N; j += i) {
        numbers[j] = false;
      }
    }
    Set<Integer> primes = new LinkedHashSet<>();
    List<Integer> listPrimes = new ArrayList<>();
    for (int i = 0; i < numbers.length; i++) {
      if (numbers[i]) {
        primes.add(i);
        listPrimes.add(i);
      }
    }
    Map<Integer, int[]> sumprimes = new HashMap<>();
    for (int i = 0; i < listPrimes.size(); i++) {
      Integer prime1 = listPrimes.get(i);
      sumprimes.put(prime1, new int[]{prime1});
      for (int j = i; j < listPrimes.size(); j++) {
        Integer prime2 = listPrimes.get(j);
        sumprimes.put(prime1 + prime2, new int[]{prime1, prime2});
      }
    }
    int tmpn = n;
    while (true) {
      if (BigInteger.valueOf(tmpn).isProbablePrime(1)) {
        break;
      }
      tmpn--;
    }
    if (sumprimes.containsKey(n - tmpn)) {
      int[] values = sumprimes.get(n - tmpn);
      System.out.println(values.length + 1);
      System.out.print(tmpn + " ");
      for (int val : values) {
        System.out.print(val + " ");
      }
      System.out.println();
    } else {
      System.out.println(-1);
    }
  }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Main {

    static Main.MyScanner sc = new Main.MyScanner();
    static PrintWriter out = new PrintWriter(System.out);

    // static PrintStream out = System.out;

    public static void main(String[] args) {
        int n = sc.nextInt(),b = n ;
        while(!isPrime(b)) b -- ;
        if(n == b){
            out.println(1 + "\n" + b);
        }else {
            int a = b - 1;
            while (!isPrime(a)) a-- ;
            for(int i = 2 ; i <= n - a ; i++){
                if(isPrime(i) && isPrime((n - a) - i)){
                    out.println(3+"\n"+a+" "+i+" "+((n-a)-i));
                    break;
                }
            }
        }
        out.close();
    }

    private static boolean isPrime(int n) {
        for(int i = 2 ; i < Math.sqrt(n) ; i++)if(n%i == 0) return false ;
        return true ;
    }

    static boolean solve(int n,long k,long v){
        long ans = v,tempk = k ;
        while (v >= k){
            ans += v/k ;
            k = k * tempk ;
        }
        return ans >= n ;
    }

    static private class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public int mod(long x) {
            // TODO Auto-generated method stub
            return (int) x % 1000000007;
        }

        public int mod(int x) {
            return x % 1000000007;
        }

        boolean hasNext() {
            if (st.hasMoreElements())
                return true;
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
            return st.hasMoreTokens();
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

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

}

import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
    static final int max = (int) 1e7;
    static boolean[] isPrime;
    static ArrayList<Integer> primes;
    static int one, two;

    public static void main(String[] args) throws IOException, InterruptedException {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        sieve();
        int n = sc.nextInt();
        if (isPrime(n)) {
            System.out.println(n);
            return;
        }
        for (int cand = n - 2; ; cand -= 2) {
            if (isPrime(cand)) {
                int diff = n - cand;
                if (diff == 2) out.println(cand + " " + 2);
                else {
                    get(diff);
                    out.println(cand  + " " + one   + " " + two);
                }
                break;
            }
        }
        out.close();
        out.flush();

    }

    static void get(int n) {
        for (int p : primes) {
            if (p > n) break;
            if (isPrime(n - p)) {
                one = p;
                two = n - p;
                return;
            }
        }
    }

    static boolean isPrime(int n) {
        if (n < max) return isPrime[n];
        for (int p : primes) {
            if (1l * p * p > n) break;
            if (n % p == 0) return false;
        }
        return true;
    }

    static void sieve() {
        isPrime = new boolean[max];
        primes = new ArrayList<>();
        Arrays.fill(isPrime, true);
        isPrime[0] = isPrime[1] = false;
        for (int i = 2; i < max; i++) {
            if (!isPrime[i]) continue;
            primes.add(i);
            if (1l * i * i < max) for (int j = i * i; j < max; j += i)
                isPrime[j] = false;
        }
    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream system) {
            br = new BufferedReader(new InputStreamReader(system));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

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

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

        public char nextChar() throws IOException {
            return next().charAt(0);
        }

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

        public boolean ready() throws IOException {
            return br.ready();
        }

        public int[] nextIntArray(int n) throws IOException {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public long[] nextLongArray(int n) throws IOException {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }

        public Integer[] nextIntegerArray(int n) throws IOException {
            Integer[] a = new Integer[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public double[] nextDoubleArray(int n) throws IOException {
            double[] ans = new double[n];
            for (int i = 0; i < n; i++)
                ans[i] = nextDouble();
            return ans;
        }

        public short nextShort() throws IOException {
            return Short.parseShort(next());
        }

    }

}