var
  a, b, c, d, i, j: int64;

function check(a: int64): boolean;
var
  i: int64;

begin
  i := 2;
  while i * i <= a do begin
    if a mod i = 0 then begin
      check := false;
      exit;
    end;
    inc(i);
  end;
  check := true;
end;

begin
  readln(a);
  i := a;
  while i > 0 do begin
    j := 2;
    while j * j <= a do begin
      if i mod j = 0 then break;
      inc(j);
    end;
    if (i mod j <> 0) and (a - i <> 2) then break;
    dec(i);
  end;
  if i = a then begin
    writeln(1);
    writeln(i);
    halt();
  end;
  writeln(3);
  write(i, ' ');
  a := a - i;
  i := 2;
  while i <= a do begin
    j := a - i;
    if (check(i)) and (check(j)) and (j > 0) then begin
      writeln(i, ' ', j);
      halt();
    end;
    inc(i);
  end;
end.

const
    tfi='324D.inp';
    tfo='324D.out';
var
    p:array[1..300] of boolean;
    n:longint;
procedure inp;
    begin
        read(n);
    end;
function check(x:longint):boolean;
    var
        i:longint;
    begin
        if x<=0 then exit(false);
        if x=1 then exit(false);
        for i:= 2 to trunc(sqrt(x)) do
            if x mod i=0 then exit(false);
        exit(true);
    end;
procedure process;
    var
        i,j:longint;
    begin
        for i:= 1 to 300 do
            if check(i) then p[i]:=true;
        if check(n) then
            begin
                writeln(1);
                writeln(n);
                exit;
            end;
        for i:= 2 to 300 do
            for j:=  2 to 300 do
                if check(n-i-j) and p[i] and p[j] then
                    begin
                        writeln(3);
                        write(i,' ',j,' ',n-i-j);
                        exit;
                    end;
    end;
begin
//    assign(input,tfi);reset(input);
  //  assign(output,tfo);rewrite(output);
    inp;
    process;
    close(input);close(output);
end.

var
n,i:longint;
function rex(a:longint):boolean;
var
i:longint;
begin
if(a=1) then begin rex:=false; exit; end;
for i:=2 to round(sqrt(a)) do if(a mod i=0) then begin rex:=false; exit; end;
rex:=true;
end;
begin
readln(n);
if(n=3) then begin writeln(1); writeln(3); halt; end;
if(n=5) then begin writeln(1); writeln(5); halt; end;
for i:=1 to n do
begin
if(rex(i)) and (rex((n-i) div 2)) and ((n-i) mod 2=0)
then begin writeln(3); write(i,' ',(n-i) div 2,' ',(n-i) div 2); exit; end;

end;
end.

const
  maxn=1000000000;
var
  p:array[1..3401]of word;
  s:array[2..3]of longint;
  primes,t,u,n,i,d:longint;
  found:boolean;
function prime(x:longint):boolean;
  var
    i:word;
  begin
    prime:=true;
    for i:=1 to primes do begin
      if sqr(p[i])>x then exit;
      if x mod p[i]=0 then begin prime:=false;exit;end;
    end;
  end;
procedure search(l,x,y:longint);
  var
    i:word;
  begin
    if l>1 then
      for i:=y to primes do begin
        if p[i]*l>x then exit;
        s[l]:=i;
        search(l-1,x-p[i],i);
        if found then exit;
      end
    else if prime(x) then begin
      writeln(d);
      for i:=d downto 2 do
        write(p[s[i]],' ');
      writeln(x);
      found:=true;
    end;
  end;
begin
  for i:=2 to trunc(sqrt(maxn)) do
    if prime(i) then begin
      inc(primes);p[primes]:=i;
    end;

    read(n);d:=0;found:=false;
    repeat
      inc(d);search(d,n,1);
    until found;

end.

var
 i,j,n,m,k,t,x:longint;
 f:array[0..1111]of boolean;
begin
 readln(n);
 for i:=n downto 2 do
 begin
  k:=0;
  for j:=2 to trunc(sqrt(i))do if i mod j=0 then begin k:=1;break;end;
  if k=0 then begin x:=i;dec(n,i);break;end;
 end;
 if n=0 then begin writeln(1);writeln(x);halt;end;
 f[1]:=true;
 for i:=2 to n do if not f[i] then
 begin
  j:=i*i;
  while j<=n do
  begin
   f[j]:=true;
   inc(j,i);
  end;
 end;
 if not f[n] then begin writeln(2);writeln(x,' ',n);halt;end;
 for i:=2 to n-2 do if(not f[i])and(not f[n-i])then
 begin
  writeln(3);writeln(x,' ',i,' ',n-i);halt;
 end;
end.

Const fi='';
      fo='';
var n,i,j,o:Longint;
a,snt:array[1..1000] Of Longint;
Procedure DocFile;
var f:Text;
begin
        Assign(f,fi);ReseT(f);
        Read(f,n);
        Close(F);
end;
Procedure Sang;
begin
        o:=0;
        for i:=2 to 1000 do a[i]:=i;for i:=2 to 1000 do
        begin
                if a[i]<>0 then
                begin
                        j:=2*i;
                        while j<=1000 do
                        begin
                                if (j mod a[i] = 0) then a[j]:=0;
                                j:=j+i;
                        end;
                end;
        end;
        for i:=2 to 1000 do
                if a[i]<>0 then
                begin
                        Inc(o);
                        snt[o]:=a[i];
                end;
end;
Function KT(x:Longint):Boolean;
var k:Longint;
begin
        for k:=2 to Trunc(Sqrt(x)) do
                if (x Mod k=0) then Exit(False);
        Exit(True);
end;
Procedure GhiFile;
var f:Text;
Procedure Xuly;
begin
        if Kt(n)=True then
        begin
                Writeln(f,1);Write(f,n);
                exit;
        end;
        for i:=1 to o do
        begin
                for j:=1 to o do
                begin
                        if snt[i]+snt[j]=n then
                        begin
                                Writeln(f,2);Write(f,snt[i],#32,snt[j]); //246351
                                exit;
                        end;
                        if (n-snt[i]-snt[j])>0 then
                        begin
                                if Kt(n-snt[i]-snt[j])=True then
                                begin
                                        Writeln(f,3);Write(f,snt[i],#32,snt[j],#32,n-snt[i]-snt[j]);
                                        exit;
                                end;
                        end;
                end;
        end;
end;
begin
        Assign(f,fo);Rewrite(f);
        Sang;
        Xuly;
        Close(F);
end;
begin
        DocFile;
        GhiFile;
end.

const finp='';
      fout='';
var n,lc:longint;
    a:array[1..3] of longint;
procedure nhap;
var f:Text;
begin
    assign(f,finp); reset(f);
    read(f,n);
    close(f);
end;
function ktnt(x:longint):boolean;
var i:longint;
begin
    if x=1 then
        exit(false);
    ktnt:=true;
    for i:=2 to trunc(sqrt(x)) do
        if x mod i=0 then
            exit(false);
end;
procedure find;
var i,j:longint;
begin
   lc:=0;
   for i:=n downto 2 do
       if ktnt(i)=true then
           begin
               inc(lc);
               a[lc]:=i;
               if n-a[lc]=0 then
                  exit;
               break;
           end;
   if lc>0 then
       n:=n-a[lc];
   for i:=0 to n do
       for j:=0 to n do
           if (i+j=n) and (ktnt(i)=true) and (ktnt(j)=true) then
               begin
                   if i<>0 then
                       begin
                           inc(lc);
                           a[lc]:=i;
                       end;
                   if j<>0 then
                       begin
                           inc(lc);
                           a[lc]:=j;
                       end;
                   exit;
               end;
end;
procedure xuat;
var f:Text;
    i:longint;
begin
    assign(f,fout); rewrite(f);
    writeln(f,lc);
    for i:=lc downto 1 do
        write(f,a[i],' ');
    close(f);
end;
begin
    nhap;
    find;
    xuat;
end.

Const Fi='';
      Fo='';
      maxN=50000;
Function  Check(k:Longint):Boolean;
Var i:Longint;
  Begin
    If k=1 then Exit(False);
    For i:=2 to Trunc(Sqrt(k)) do
      If k mod i=0 then Exit(False);
    Exit(True);
  End;
Procedure Enter;
Var n,i:Longint;
  Begin
    Readln(n);
    If Check(n) then
      Begin
        Writeln(1);
        Writeln(n);
        Exit;
      End;
    If Check(n-2) then
      Begin
        Writeln(2);
        Writeln(2,' ',n-2);
        Exit;
      End;
    For i:=3 to maxN do
      If Odd(i) and Check(i) and Check((n-i) Div 2) then
        Begin
          Writeln(3);
          Writeln(i,' ',(n-i) Div 2,' ',(n-i) Div 2);
          Exit;
        End;
  End;
Begin
  Assign(Input,Fi);Reset(Input);
  Assign(Output,Fo);Rewrite(Output);
  Enter;
  Close(Input);Close(Output);
End.

var n,m,i,k,j,ans,lik,ii,jj,ans1:longint;
begin
readln(n);
for i:=n downto n-300 do
begin
m:=i;
ans:=0;
for j:=1 to trunc(sqrt(m)) do
if (j*j=m) then inc(ans) else
if (m mod j=0) then inc(ans,2);
if (ans=2) then begin lik:=i;break;end;
end;

if (lik=n) then begin writeln(1);writeln(n);halt;end;

for ii:=2 to 300 do
for jj:=2 to 300 do
begin
m:=ii;
ans:=0;
for j:=1 to trunc(sqrt(m)) do
if (j*j=m) then inc(ans) else
if (m mod j=0) then inc(ans,2);
m:=jj;
ans1:=0;

for j:=1 to trunc(sqrt(m)) do
if (j*j=m) then inc(ans1) else
if (m mod j=0) then inc(ans1,2);
if (ans=2)and(ans1=2) then
if (lik+ii+jj=n) then begin writelN(3);writeln(lik,' ',ii,' ',jj);halt;end else
if (lik+ii=n) then   begin writelN(2);writeln(lik,' ',ii);halt;end else
if (lik+jj=n) then   begin writelN(2);writeln(lik,' ',jj);halt;end else
if (ii+jj=n) then   begin writelN(2);writeln(ii,' ',jj);halt;end;
end;

end.

Const
  Fi='';//584D.INP';
  Fo='';//584D.OUT';

Var n:Longint;
    Res:Array[0..3] of Longint;

Function  Check(x:Longint):Boolean;
Var i:Longint;
Begin
  If x<=1 then Exit(False);
  If x<4 then Exit(True);
  If (x Mod 2=0) or (x Mod 3=0) then Exit(False);

  For i:=2 to Trunc(Sqrt(x)) do
    If x Mod i=0 then Exit(False);
  Exit(True);
End;

Procedure Find(i,k:Longint);
Var j,k1:Longint;
Begin
  If i>3 then Exit;

  If Check(k) then
    Begin
      Res[i]:=k;
      Writeln(i);
      For j:=i downto 1 do
        Write(Res[j],' ');
      Halt;
    End;

  k1:=k-1;
  While k1>0 do
    Begin
      If Check(k1) then
        Begin
          Res[i]:=k1;
          Find(i+1,k-k1);
        End;
      Dec(k1);
    End;
End;

BEGIN
  Assign(Input,Fi); Reset(Input);
  Assign(Output,Fo); Rewrite(Output);

  Readln(n);
  Find(1,n);

  Close(Input);
  Close(Output);
END.

{$mode objfpc}
const nmax=round(1E5);
var n:integer;
function check(k:integer) :boolean;
   var i:integer;
   begin
       if k<2 then exit(false);
       for i:=2 to trunc(sqrt(k)) do
         if k mod i=0 then exit(false) ;
       exit(true);
   end;
procedure main;
   var i:integer;
   begin
       readln(n);
       if check(n) then
         begin
           writeln(1);
           writeln(n) ;
           exit;
         end;
       if check(n-2) then
         begin
           writeln(2);
           writeln(2,' ',n-2) ;
           exit;
         end;
       for i:=3 to nmax do
         if check(i) and (check((n-i) div 2))  then
           begin
             writeln(3);
             writeln(i,' ',(n-i) div 2,' ',(n-i) div 2);
             break;
           end;

  end;
BEGIN
   main;
   readln
END.

var
n,i:longint;
function aval(a:longint):boolean;
var
i:longint;
begin
if(a=1) then exit(false);
for i:=2 to round(sqrt(a)) do if(a mod i=0) then exit(false);
exit(true);
end;
begin
readln(n);
if(n=3) then begin writeln(1); writeln(3); halt; end;
if(n=5) then begin writeln(1); writeln(5); halt; end;
for i:=1 to n do
begin
if(aval(i)) and (aval((n-i) div 2)) and ((n-i) mod 2=0)
then begin writeln(3); write(i,' ',(n-i) div 2,' ',(n-i) div 2); halt; end;
{writeln(aval(i));
writeln(aval((n-i)div 2));}
end;
end.

var n:longint;

Function Check(x:longint):boolean;
var i:longint;
begin
for i:=2 to trunc(sqrt(x)) do
	if x mod i=0 then exit(false);
exit(true);
end;

Procedure Process;
var i,j:longint;
begin
read(n);
if check(n) then
	begin
	writeln(1);
	writeln(n);
	exit;
	end;
if check(n-2) then
	begin
	writeln(2);
	writeln(2,' ',n-2);
	exit;
	end;
writeln(3);
for i:=4 to 1000 do
	if i mod 2=0 then
		if check(n-i) then
			begin
			for j:=2 to i do
				if check(j) and check(i-j) then
					begin
					writeln(j,' ',i-j,' ',n-i);
					exit;
					end;
			end;
end;

begin
Process;
end.

var
n,i:longint;
function aval(a:longint):boolean;
var
i:longint;
begin
if(a=1) then exit(false);
for i:=2 to round(sqrt(a)) do if(a mod i=0) then exit(false);
exit(true);
end;
begin
readln(n);
if(n=3) then begin writeln(1); writeln(3); halt; end;
if(n=5) then begin writeln(1); writeln(5); halt; end;
for i:=1 to n do
begin
if(aval(i)) and (aval((n-i) div 2)) and ((n-i) mod 2=0)
then begin writeln(3); write(i,' ',(n-i) div 2,' ',(n-i) div 2);  halt; end;
{writeln(aval(i));
writeln(aval((n-i)div 2));}
end;
end.

Var                   n,m,h,k,kq:int64;

Function              Check(h:longint):boolean;
 Var                  i:longint;
 Begin
  If h=1 then Exit(true);
  For i:=2 to trunc(sqrt(h)) do
   If h mod i = 0 then Exit(true);
  Exit(false);
 End;
BEGIN
 Readln(n);
 k:=n;
 If check(k)=false then
  begin
   writeln('1');
   Writeln(k);
  End
 Else
  Begin
   While check(k) do Dec(k);
   kq:=k;
   k:=n-k;
   If check(k)=false then
    Begin
     writeln('2');
     Writeln(kq,' ',k);
    End
   Else
    Begin
     m:=k-1;
     While (check(m)) or (check(k-m)) do Dec(m);
     Writeln('3');
     Writeln(kq,' ',m,' ',k-m);
    End;
  End;
 Readln;
END.

var
 n : longint;
 a : array [1 .. 3] of longint;
 k,i : longint;

 //prost

 function prost(a : longint) : boolean;
  var
   i : longint;
  begin
   for i := 2 to trunc(sqrt(a)) do
     if a mod i = 0
        then begin
             prost :=false;
             exit;
             end;
   prost := true;
  end;
begin
{ assign(input,'input.txt');
  reset(input); }
  read(n);
{ close(input);}
 if prost(n) = true
    then begin
         a[1] := n;
         k := 1;
         end
    else begin
         if n mod 2 = 1
            then begin
                 k := 3;
                 a[1] := 3;
                 dec(n,3);
                 end
            else k := 2;
         i := 3;
         while (prost(i) <> true) or (prost(n - i) <> true) do
           inc(i,2);
         a[k] := n - i;
         a[k - 1] := i;
         end;
{ assign(output,'output.txt');
  rewrite(output);}
  writeln(k);
  for i := 1 to k do
    write(a[i],' ');
{ close(output);     }
end.

var
  n,i,x,y,z : longint;

  function pr(x : longint) : boolean;
    var
      i : longint;
    begin
      if x = 1 then exit(false);
      if x = 2 then exit(true);
      for i:=2 to trunc(sqrt(x))+1 do
        if x mod i = 0 then exit(false);
      exit(true);
    end;

begin
  readln(n);
  if pr(n) then begin writeln(1); writeln(n); halt; end;
  if n mod 2 = 1 then begin
    if pr(n-2) then begin
      writeln(2);
      writeln(n-2,' ',2);
      halt;
    end;
    for i:=3 to n do
      if pr(i) then begin
        x:=(n-i) div 2; y:=x;
        while ((not pr(x)) or (not pr(y))) and (x > 1) do begin
          dec(x);
          inc(y);
        end;
        if (x > 1) then begin
          writeln(3);
          writeln(i,' ',x,' ',y);
          halt;
        end;
      end;
  end else begin
    x:=n div 2; y:=x;
    while (not pr(x)) and (not pr(y)) do begin
      dec(x);
      inc(y);
    end;
    writeln(2);
    writeln(x,' ',y);
  end;
end.

{ct nt}
function nt(a:longint):boolean;
 var i:longint;
 begin
  if a<2 then exit(false);
  if (a=2)or(a=3)or(a=5)or(a=7) then exit(true);
  if (a mod 2=0)or(a mod 3=0) then exit(false);
  nt:=true;
  i:=1;
  while i<round(sqrt(a)) do
  begin
   i:=i+2;
   if a mod i=0 then exit(false);
  end;
 end;
{ct c}
var n,i,t:longint;
 begin
   readln(n);
   if nt(n) then
    begin
     writeln(1);
     writeln(n);
     readln;
     exit;
    end;
   if nt(n-2) then
    begin
     writeln(2);
     writeln(2,' ',n-2);
     readln;
     exit;
    end;
   for i:=n downto 2 do
    if nt(i) then
     begin
      t:=i;
      break;
     end;
    n:=n-t;
    for i:=2 to n do
     if (nt(i))and(nt(n-i)) then
      begin
       writeln(3);
       writeln(i,' ',n-i,' ',t);
       readln;
       exit;
      end;
  readln
 end.

var
     N,i,j,X1,X2,X3:Longint;
function P(X:Longint):Boolean;
var
     Y,i:Longint;
     F:Boolean;
begin
     Y:=Trunc(Sqrt(X));
     F:=True;
     for i:=2 to Y do
     if X mod i=0 then begin
                            F:=False;
                            Break;
                        end;
     Exit(F);
 end;

begin
     Readln(N);
     if P(N) then begin
                       Writeln('1');
                       Writeln(N);
                       Halt;
                   end;
     for i:=N-2 downto 1 do
     if P(i) then begin
                       X1:=i;
                       Break;
                   end;
     N:=N-X1;
     if N<>1 then
     if P(N) then begin
                       Writeln('2');
                       Writeln(x1,' ',N);
                       Halt;
                   end;
     for i:=2 to N-2 do
begin
     j:=N-i;
     if (P(i)) and (P(j)) then begin
                                    X2:=i;
                                    X3:=j;
                                    Break;
                                end;
 end;
     Writeln('3');
     Writeln(X1,' ',X2,' ',X3);
 end.

Program _1;
Var
   n,a1,a2,a3,kol:longint;
Function prost(n:longint):boolean;
Var
   i:longint;
Begin
   if n=1 then prost:=false;
   if n=3 then begin
               prost:=true;
               exit;
               end;
   i:=3;
   while i<=round(sqrt(n))+1 do begin
             if n mod i=0 then
                 begin
                 prost:=false;
                 exit;
                 end;
             inc(i,2);
             end;
             prost:=true;

End;
Begin
   {assign(input,'input.txt');
   assign(output,'output.txt');
   reset(input);
   rewrite(output);}
   read(n);
   a1:=3;
   a2:=0;
   a3:=0;
   kol:=1;
   n:=n-3;
   if n=0 then begin
               writeln(kol);
               write(a1);
               exit;
               end;
   if n=2 then begin
               writeln(2);
               write(a1,' 2');
               exit;
               end;
   if n=4 then begin
               writeln(3);
               write(a1,' 2 2');
               exit;
               end;
   a2:=n div 2;
   if not odd(a2) then begin
                       dec(a2);
                       a3:=a2+2;
                       end
   else a3:=a2;
   while (not prost(a2))or(not prost(a3)) do begin

      dec(a2,2);
      inc(a3,2);
   end;
   writeln(3);
   write(a1,' ',a2,' ',a3);
   {close(input);
   close(output);}
End.

program summa_prostych;
var n,i,t,n1,n2,n3,k,t1,t2,nn:longint;

function prost(var x:longint):boolean;
        var j,kol:longint;
begin
kol:=0;
for j:=1 to trunc(sqrt(x)) do
if x mod j=0 then inc(kol);
if kol=1 then prost:=true else prost:=false;

end;

begin
readln(n);

if prost(n)=true then begin writeln(1); writeln(n); halt; end;

for i:=n-1 downto n-300 do
begin
t:=i;
if prost(t)=true then begin
                      n1:=t;
                      break;
                      end;

end;

        nn:=n-n1;

  if (prost(nn)=true)and(nn>1) then begin writeln(2); writeln(nn,' ',n1); halt; end;

 for i:=1 to n-n1 do
 for k:=1 to n-n1 do
 begin
 t1:=i;
 t2:=k;
 if (prost(t1)=true) and (prost(t2)=true) and((t1+t2+n1)=n) and(t1>1) and(t2>1) then begin n2:=t1; n3:=t2; writeln(3);
writeln(n1,' ',n2,' ',n3); halt; end;
 end;

end.

program Program56;
var
n,i,j,a,b,c:Integer;
function Prost(x:Integer):Boolean;
var
ii:Integer;
begin
    if x=1 then
    begin
        Result:=false;
        exit;
    end;
    if x=2 then
    begin
        Result:=true;
        exit;
    end;
    for ii:=2 to trunc(sqrt(x))+1 do
    begin
        if (x mod ii)=0 then
        begin
            result:=false;
            exit;
        end;
    end;
    result:=true;
end;
function NearProst(x:Integer):Integer;
var
    ii:Integer;
    b:Boolean;
begin
    for ii:=x downto 2 do
    begin
        b:=prost(ii);
        if b then
        begin
            Result:=ii;
            Break;
        end;
    end;
end;
begin
    Readln(n);
    a:=nearprost(n);
    if n=a then
    begin
        Writeln(1);
        Writeln(n);
        Halt(0);
    end;
    if a+1=n then a:=nearprost(a-1);
    if prost(n-a) then
    begin
        Writeln(2);
        Writeln(a,' ',n-a);
        exit;
    end;
    for i:=2 to n-a do
    begin
        b:=i;
        c:=n-a-i;
        if (prost(b)) and (prost(c)) then
        begin
            Writeln(3);
            Writeln(a,' ',b,' ',c);
            Halt(0);
        end;
    end;
end.

var i,j,k,n,sl:longint;
        a:array[0..10] of longint;
procedure im;
var p:longint;
begin
        a[1]:=n-j;a[2]:=i;a[3]:=j-i;
        for p:=1 to 3 do if a[p]<>0 then inc(sl);
        writeln(sl);
        for p:=1 to 3 do if a[p]<>0 then write(a[p],' ');
end;
function th(x:longint):boolean;
var i:longint;
begin
        if x=1 then exit(false);
        if (x=0) or (x=2) then exit(true);

        for i:=2 to trunc(sqrt(x)) do
                if x mod i= 0 then
                begin
                        exit(false);
                end;
        exit(true);
end;
begin
        readln(n);
        for j:=0 to 300 do
        begin
                if n-j>=0 then
                if th(n-j) then
                begin
                        for i:=0 to j do if th(i) then
                        begin
                                begin
                                        if th(i) and th(j-i) then
                                        begin
                                                im;
                                                exit;
                                        end;
                                end;
                        end;
                end;
        end;
end.

program PD;
var
  n,cnt,i:longint;
  ans:array[1..3] of longint;

function judge(u:longint):boolean;
var
  i:longint;
begin
  for i:=2 to trunc(sqrt(u)) do
    if u mod i=0 then exit(false);
  exit(true);
end;

procedure work(u:longint);
var
  i:longint;
begin
  for i:=3 to u do
  begin
    if judge(i) then
      if judge(u-i) then
      begin
        inc(cnt);
        ans[cnt]:=i;
        inc(cnt);
        ans[cnt]:=u-i;
        exit;
      end;
  end;
end;

begin
  readln(n);
  if n=4 then
  begin
    writeln(2);
    writeln(2,' ',2);
    halt;
  end;
  if judge(n) then
  begin
    writeln(1);
    writeln(n);
    halt;
  end;
  if n and 1=1 then
  begin
    inc(cnt);
    ans[cnt]:=3;
    dec(n,3);
  end;
  work(n);
  writeln(cnt);
  for i:=1 to cnt do
    write(ans[i],' ');
end.

const
      fi='';
      fo='';
var
nt,pos:array[1..10000000]of longint;
n,m:longint;
f,g:text;
{======================================}
Procedure Khoitao;
Var
      i,j:longint;
      Begin
            For i:=1 to 10000000 do nt[i]:=0;
            FOr i:=2 to trunc(sqrt(10000000)) do
                  if nt[i]=0 then
                        Begin
                              j:=i*i;
                              while j<=10000000 do
                                    Begin
                                          nt[j]:=i;
                                          j:=j+i;
                                    End;
                        End;
            m:=0;
            For i:=3 to 10000000 do if nt[i]=0 then
                  begin
                        inc(m);
                        pos[m]:=i;
                  end;
      End;
{==========================================}
function check(x:longint):boolean;
var
      i:longint;
      begin
            if x=1 then exit(false);
            if x=2 then exit(true);
            for i:=2 to trunc(sqrt(x)) do if x mod i=0 then exit(false);
            exit(true);
      end;
{===========================================}
Procedure main;
var
      i,j:longint;
      begin
            if check(n)=true then
                  begin
                        writeln(g,1);
                        writeln(g,n);
                        exit;
                  end;
            if check(n-2)=true then
                  begin
                        writeln(g,2);
                        writeln(g,2,' ',n-2);
                        exit;
                  end;
            if check(n-4)=true  then
                  begin
                        writeln(g,3);
                        writeln(g,2,' ',2,' ',n-4);
                        exit;
                  end;
            writeln(g,3);
            for i:=1 to m do
            for j:=i to m do
                        if check(n-pos[i]-pos[j])=true then begin writeln(g,pos[i],' ',pos[j],' ',n-pos[i]-pos[j]);exit;end;
      end;
{========================================}
Procedure enter;
begin
      assign(f,fi);reset(f);
      assign(g,fo);rewrite(g);
      readln(f,n);
end;
begin
      enter;
      khoitao;
      main;
      close(g);
      close(f);
end.

var n: longint;
    i, j, k: longint;
    b: array [1..99991] of boolean;
    p: array [1..9592] of longint;
function check(a: longint): boolean;
var i: longint;
begin
        for i := 1 to k do
        begin
                if sqr(p[i]) > a then
                        exit(true);
                if a mod p[i] = 0 then
                        exit(false);
        end;
end;
begin
        for i := 2 to 99991 do
        begin
                if b[i] then continue;
                inc(k);
                p[k] := i;
                for j := i to 99991 div i do
                        b[i * j] := true;
        end;
        readln(n);
        if check(n) then
        begin
                writeln(1);
                writeln(n);
        end
        else if check(n - 2) then
        begin
                writeln(2);
                writeln('2 ', n - 2);
        end
        else if check(n - 4) then
        begin
                writeln(3);
                writeln('2 2 ', n - 4);
        end
        else begin
                n := n - 3;
                for i := 2 to k do
                        if check(n - p[i]) then
                        begin
                                writeln(3);
                                writeln('3 ', p[i], ' ', n - p[i]);
                                break;
                        end;
        end;
end.

{$mode objfpc}
uses
        math;
const
        ip = '';
        op = '';
        e5 = round(1e5);
        e6 = round(1e6);
var
        fi, fo: text;
        cnt, N: integer;
        res: array[1..3] of integer;

procedure enter;
begin
        assign(fi, ip); reset(fi);
        assign(fo, op); rewrite(fo);
        readln(fi, N);
end;

function pr(x: integer): boolean;
var
        i: integer;
begin
        pr := true;
        for i := 2 to trunc(Sqrt(x)) do
                if x mod i = 0 then exit(false);
end;
procedure solve;
var
        a, b, i: integer;
begin
        cnt := 0;
        if pr(n) then
        begin
                writeln(1);
                writeln(n);
                exit
        end;
        if odd(n) then
        begin
                inc(cnt);
                res[cnt] := 3;
                dec(n, 3);
        end;
        a := ceil(n/2); b := trunc(n/2);
        while (not pr(a)) or (not pr(b)) do
        begin
                inc(a);
                dec(b);
        end;
        inc(cnt); res[cnt] := a;
        inc(cnt); res[cnt] := b;
        writeln(cnt);
        for i := 1 to cnt do
                write(res[i], ' ');
        writeln
end;

procedure clean;
begin
        close(fi); close(fo);
end;

begin
        ENTER;
        SOLVE;
        CLEAN;
end.

Program ILoveYou;
VAR n,i,prime:int64;

function Prim(x : int64) : boolean;
VAR i:int64;
Begin

Prim:=true;
i:=2;
while (i <= sqrt(x)) do
Begin
if ((x mod i) = 0) then Begin Prim:=false; i:=x; end;
i:=i + 1;
end;

end;

Begin

Readln(n);
if (Prim(n)) then
Begin
Writeln('1');
Writeln(n);
end else
Begin

if (Prim(n - 2)) then
Begin

Writeln('2');
Writeln('2 ',n - 2);

end else
Begin

Writeln(3);
i:=n - 4;
while (not (Prim(i))) do
Begin
i:=i - 2;
end;

Write(i,' ');
n:=n - i;
for i:=2 to n do
Begin
if (Prim(i)) and (Prim(n - i)) then break;
end;

Writeln(i,' ',n - i);

end;

end;

Readln;
END.

{$mode objfpc}
uses
        Math;
const
        {$IFDEF ONLINE_JUDGE}
        InputFile  = '';
        OutputFile = '';
        {$ELSE}
        InputFile = 'test.inp';
        OutputFile = '';
        {$ENDIF}
       // maxN = ;
var
        fi, fo: TextFile;
        cnt, N: integer;
        res: array[1..3] of Integer;

procedure Enter;
var
        i: Integer;

begin
        Assign(fi, inputFile); Reset(fi);
        Assign(fo, outputFile); Rewrite(fo);
        Readln(fi, N);
end;

function Pr(x: Integer): Boolean;
var
        i: Integer;
begin
        pr := True;
        for i := 2 to Trunc(Sqrt(x)) do
                if x mod i = 0 then exit(false);
end;
procedure Solve;
var
        a, b, i: Integer;
begin
        cnt := 0;
        if Pr(n) then
        begin
                writeln(1);
                writeln(n);
                exit
        end;
        if Odd(n) then
        begin
                inc(cnt);
                res[cnt] := 3;
                dec(n, 3);
        end;
        a := Ceil(n/2); b := Trunc(n/2);
        while (not Pr(a)) or (not Pr(b)) do
        begin
                inc(a);
                dec(b);
        end;
        inc(cnt); res[cnt] := a;
        inc(cnt); res[cnt] := b;
        Writeln(cnt);
        for i := 1 to cnt do
                Write(res[i], ' ');
        Writeln
end;

procedure Clean;
begin
        CloseFile(fi); CloseFile(fo);
end;

{ MAIN }
begin
        Enter;
        Solve;
        Clean;
end.
{ END OF MAIN }

program h1;
var
x,i,j,k,t:integer;

function isprime(y:integer):boolean;
 var  flag:boolean;
      r:integer;
 begin
  if y=1 then begin isprime:=false; exit; end;
  r:=trunc(sqrt(y+1));
  j:=2;
  while (y mod j >0)and(j<=r) do j:=j+1;
  if (y mod j =0) and (j<y) then isprime:=false else isprime:=true;
 end;

begin
 readln(x);
 t:=0;
 while not(isprime(x-t)) do t:=t+1;
 k:=0;
 while not(isprime(t-k)and(isprime(k))) and (t>0)do k:=k+1;
 if (t=0) then
		begin
			writeln('1');
			writeln(x);
		end
			else
				if k=0 then
					begin
					 writeln('2');
					 writeln(x-t,' ',t);
					end
						else
							begin
								writeln('3');
								writeln(x-t,' ',t-k,' ',k);
							end;
end.

var j,n,m,x,i,l,r,s:longint;a,b:array[0..122000]of  int64;f:boolean;t,nn,mm,kk:int64;
function pr(a:int64):boolean;
var f:boolean;n:int64;
begin
 if (a=3)or(a=5)or(a=7)or(a=11)or(a=13) then pr:=true else
 begin
  n:=1;f:=true;
  while n*n<a do  begin
   n:=n+2;if a mod n=0 then begin f:=false;break;end;
  end;
  pr:=f;
 end;
end;
function nod(a,b:int64):int64;
var r:longint;
begin
 r := a mod b;
 while r>0 do
 begin
  a:=b;
  b:=r;
  r := a mod b;
 end;
 nod:=b;
end;
begin{
assign(input,'input.txt');reset(input);
assign(output,'output.txt');rewrite(output);}
read(nn);if pr(nn) then begin writeln(1);write(nn);;halt;end;
  {a[1]:=2;a[2]:=3;a[3]:=5;a[4]:=7;
  a[5]:=11;A[6]:=13;A[7]:=17;A[8]:=19;read(nn);

  i:=8;
  T:=21;
  WHILE T*T<1000000000 DO
  BEGIN
   INC(T,2);f:=true;
   for j:=2 to  i do
   if t mod a[j]=0 then begin
   f:=false   ;break;
   end;
   if f then begin
   inc(i);a[i]:=t ; end;

  END;}writeln(3);
  mm:=nn div 3;if not odd(mm) then mm:=mm-1;
  while 5=2+3 do begin
  while not pr(mm) do mm:=mm-2;
   kk:=nn-mm;
   kk:=kk div 2;if not odd(kk) then kk:=kk-1;
   while not pr(kk) do kk:=kk-2;
   if pr (nn-mm-kk) then begin write(kk,' ',mm,' ',nn-mm-kk);halt;end;
   mm:=mm-2; end;
end.

const eps=0.0000000001;  besk=20000000000008;  nn=200000;
   label 1,2,3,4;
    type    real=extended;  {string=ansistring;}
  {  mas=array [-10..nn] of int64; }  point=record x,y,z:real;end;
    zap=record p1,p2,p3 :int64;end; zap1=^zap;
   { mass1=^mass; }
    var qsum,nado,otfinish,ott,p,qq,kk,cc,pp,rr,v1,v2,kol,k1,ii,jj,q,pos,z,pmax,imax,p1,p2,p3,p4,l,ot,nm,s1,s2,m,s,smin,cen,dl,t2,i1:int64;
    t,mask,n,k,h,step,i,j:longint;
    i2,oldot,tt,modul,aaa,bbb, aa,bb,ccc:int64;
    xnew,xold, bold,bnew,r,x,y,d,c,aold,b,a:array[-1000..500000] of int64;
     marked:array[-10..300030] of boolean;
   dd:array[-1..10,-10..20000] of int64;
    sss, ss1,ss2:string;
    sst,st:array [-10..1000000] of char;
     zan1,zan2,zan,fl:array[-10..200000] of boolean;
    ss:string;ch:char;
   mm,matr,ddp, pole :array [-10..100,-10..100] of char;
   sm:array[-10..100,-10..100,-10..100] of int64;
    maxpr:array[0..nn] of string;
    st2:array[0..nn] of string;
     left,right,v0,s0,t0:extended;
     zv:point;
     newx,newy,xx,yy:array[-1..200000] of int64;

     yot:double;
       flag,flag1:boolean;
    function al(x,y:real):real; var t0,t1,p,s0,s1:real;
 begin
     if (x>0)and(y>=0) then p:=arctan(y/x);
     if x<0 then p:=pi+arctan(y/x);
     if(x>0)and(y<0) then p:=2*pi+arctan(y/x);
     if x=0 then if (y>=0) then p:=pi/2 else p:=3*pi/2;
     al:=p/pi*180;
 end;
  function min(x,y:int64):int64;begin min:=x;if y<x then min:=y; end;
  function max(x,y:int64):int64;begin max:=x;if y>x then max:=y; end;

  function nod(x,y:int64):int64; var z:int64;
begin   repeat  z:=x mod y;x:=y;y:=z;   until  z=0 ;  nod:=x;end;

function degg(p,deg:int64):int64; var pp,q:int64;
 begin if deg=0 then degg:=1 else begin   if odd(deg) then degg:=degg(p,deg-1)*p mod modul else
 begin q:=(degg(p,deg shr 1)) mod modul; degg:=(q*q) mod modul;   end; end;   end;

function prost(t:longint):boolean;
label 234;
 var i,j:longint;  fl:boolean;
begin
   fl:=true;
   if t<=1 then fl:=false;
   i:=1; while (i*i<=t) do
     begin
        inc(i);
        if (t mod i=0)and(i<>t) then
       begin
        fl:=false; goto 234;
       end;
     end;
234: prost:=fl;
end;

begin
  {  assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
   }
   read(n);
   if (n=3)or(n=5) then begin  writeln(1); write(n); goto 1;  end;
   if (n=4) then begin  writeln(2); write(2,' ',2); goto 1; end;

    if n<1000 then
      begin
         for i:=1 to n do for j:=1 to n-i do
           begin
              k:=n-i-j;
               if prost(i) and prost(j) and prost(k) then
               begin writeln(3);
                 writeln(i,' ',j,' ',k);  goto 1;
               end;
           end;

      end;

   for k:=6 to 100000 do
   begin
    { writeln() }
     if prost(n-k) and not odd(k) then
       begin
          writeln(3);
          write(n-k,' ');
          for i:=1 to k do if prost(i) and prost(k-i) then
            begin  write(i, ' ',k-i); goto 1;     end;

       end;
   end;

   1:          close(output);

end.

const fi = 'dima.inp';
      fo = 'dima.out';

var n,i : longint;

procedure mt;
begin
   assign(input,fi); reset(input);
   assign(output,fo); rewrite(output);
end;

procedure dt;
begin
  close(input); close(output);
end;

function nt(m:longint) : boolean;
var i : longint;
begin
  if m = 1 then exit(false);
  for i := 2 to trunc(sqrt(m)) do
    if m mod i = 0 then exit(false);
  exit(true);
end;

procedure xuli;
begin
  read(n);
  if nt(n) then begin writeln(1); write(n); dt; halt; end;
  for i := 1 to n div 2 do
    if (nt(i)) and (nt((n-i) div 2)) and ((n-i) mod 2 = 0) then
      begin
        writeln(3);
        write(i,' ',(n-i) div 2, ' ', (n-i) div 2);
        halt;
      end;
  for i := 1 to n div 2 do
    if nt(i) and nt(n-i) then
      begin
        writeln(2); write(i,' ',n-i); halt;
      end;

end;

BEGIN
  //mt;
  xuli;
  //dt;
END.

program NumD;

{$APPTYPE CONSOLE}

uses
  SysUtils;

const
  inf = 1000000007;

var
  i, n, m: integer;
  ans: array [1..10] of integer;

function prime(n: integer): boolean;
var
  i: integer;
begin
  result := true;
  if n = 1 then result := false;
  for i := 2 to trunc(sqrt(n)) do
    if n mod i = 0 then begin
      result := false;
      exit;
    end;
end;

begin
  readln(n);
  m := 0;
  if odd(n) then begin
    inc(m);
    for i := n downto 1 do
      if prime(i) then begin
        ans[m] := i;
        dec(n, i);
        break;
      end;
  end;
  if n > 0 then
    if n = 2 then begin
      inc(m);
      ans[m] := 2;
    end
    else begin
      for i := n - 2 downto 1 do
        if prime(i) and prime(n - i) then begin
          inc(m);
          ans[m] := i;
          inc(m);
          ans[m] := n - i;
          break;
        end;
    end;
  writeln(m);
  for i := 1 to m do
    write(ans[i], ' ');
  writeln;
  readln;
end.

  var
  n,i,x,j,xx,c:longint;
  bol:boolean;
function check(x:longint):longint;
begin
check:=0;
for c:=2 to round(sqrt(x)) do if x mod c= 0 then begin
    check:=1;
    break;
end;
if x=1 then check:=1;
end;
  begin
  readln(n);
  if n=3 then begin
      writeln(1);
      writeln(3);
  end
  else
  if n=5 then begin
     writeln(2);
     writeln(3,' ',2);
  end
  else if n=7 then begin
      writeln(3);
      writeln(3,' ',2,' ',2);
  end
  else
  if n=9 then begin
      writeln(3);
      writeln(3,' ',3,' ',3);
  end
  else begin
writeln(3);
write(3,' ');
n:=n-3;
for i:=n-1 downto 1 do begin
    if (check(n-i)=0)and(check(i)=0) then begin
        write(i,' ',n-i);
        break;
    end;
end;
end;
end.

{$APPTYPE CONSOLE}
var n,i,j:integer;

function prost(x:integer):boolean;
var t:integer;
    rez:Boolean;
begin
  if x<4 then rez:=True
  else
  begin
    rez:=not(x mod 2=0);
    t:=3;
    while (rez) and (t*t<=x) do
    begin
      rez:=not(x mod t=0);
      Inc(t,2);
    end;
  end;
  prost:=rez;
end;

begin
  Readln(n);
  if prost(n) then
  begin
    Writeln(1);
    writeln(n);
  end
  else
    if prost(n-2) then
    begin
      writeln(2);
      Writeln(2,' ',n-2);
    end
    else
    begin
      i:=3; j:=3;
      while not(prost(i) and prost(j) and prost(n-i-j)) do
      begin
        Inc(j,2);
        while not(prost(j)) and (i+2*j<=n) do inc(j,2);
        if (n-i-j)<j then
        begin
          Inc(i,2);
          while not(prost(i)) do inc(i,2);
          j:=i;
        end;
      end;
      Writeln(3);
      Writeln(i,' ',j,' ',n-i-j);
    end;
  Readln;
end.

var
 st:array[1..1000]of longint;
 n,i,j,s:longint;
function test(n:longint):boolean;
var j:longint;
begin
 for j:=2 to round(sqrt(n))do if n mod j=0 then exit(false);
 exit(true);
end;
begin
 readln(n);
 if test(n) then
 begin
  writeln(1);
  writeln(n);halt;
 end;
 if n and 1 = 1 then
 begin
  inc(s);
  st[s]:=3;
  n:=n-3;
 end;

 for i:=2 to n-1 do
 begin
  if not test(i) then continue;
  if test(n-i)then
  begin
   inc(s);
   st[s]:=i;
   inc(s);
   st[s]:=n-i;
   writeln(s);
   for j:=1 to s do write(st[j],' ');
   halt;
  end;
 end;
end.

USES math;
CONST
    tfi='';
    tfo='';
VAR
    n,cnt : longint;
    p : array[1..1000000] of longint;
function check(x : longint):boolean;
    var i : longint;
    begin
        for i:=2 to trunc(sqrt(x)) do
          if x mod i = 0 then exit(false);
        exit(true);
    end;
procedure nhap;
    var i,j : longint;
    begin
        read(n);
        for i:=2 to min(n,1000000) do
          if check(i) then
            begin
              inc(cnt);
              p[cnt]:=i;
            end;
        if check(n) then
          begin
            writeln(1);
            write(n);
            exit;
          end;
        for i:=1 to cnt do
          if check(n-p[i]) then
            begin
              writeln(2);
              write(p[i],' ',n-p[i]);
              exit;
            end;
        for i:=1 to cnt do
          for j:=1 to cnt do
            if check(n-p[i]-p[j]) then
              begin
                writeln(3);
                write(p[i],' ',p[j],' ',n-p[i]-p[j]);
                exit;
              end;
    end;
BEGIN
    assign(input,tfi); reset(input);
    assign(output,tfo); rewrite(output);
        nhap;
    close(input); close(output);
END.

Var
  n,i,j:longint;
Function F(n:longint):boolean;
Var
  i,g:longint;
Begin
  if n=2 then
    begin
      result:=true;
      exit;
    end;
  if (n mod 2=0)or(n=1) then
    begin
      result:=false;
      exit;
    end;
  g:=round(sqrt(n)+2);
  i:=3;
  result:=true;
  while (i<=g)and(i<n) do
    begin
      if n mod i=0 then
        begin
          result:=false;
          break;
        end;
      inc(i,2);
    end;
end;
begin
//  assign(input,'input.txt');assign(output,'output.txt');
  readln(n);
  if f(n) then
    begin
      writeln(1);
      writeln(n);
      halt(0);
    end;
  for i:=n downto 1 do
    if f(i) then
      begin
        if f(n-i) then
          begin
            writeln(2);
            writeln(i,' ',n-i);
            halt(0);
          end;
        for j:=2 to n-i do
          if  f(j)and f(n-i-j) then
            begin
              writeln(3);
              writeln(i,' ',j,' ',n-i-j);
              halt(0);
            end;
      end;
end.

var a,b:array[1..300]of longint;
    n,t,i,ii,j:longint;
function prost(x:longint):boolean;
   var  i:longint;
   begin
   i:=2;
   prost:=true;
   while i*i<=x do
      begin
      if x mod i =0 then prost:=false;
      inc(i);
      end;
   end;
begin
read(n);
if prost(n) then begin writeln(1);write(n); halt end;
t:=n-2;
while not(prost(t)) do dec(t); if n-t=2 then begin writeln(2); write(2,' ',t); halt end else writeln(3);
t:=n-t;
for i:=2 to t do
   if a[i]=0 then
      begin
      j:=i+i;
      while j<=t do
         begin
         a[j]:=1;
         inc(j,i);
         end;
      end;
j:=0;
for i:=2 to t do
   if a[i]=0 then
       begin
       inc(j);
       b[j]:=i;
       end;
for i:=1 to j do
   for ii:=i to j do
      if b[i]+b[ii]=t then
         begin
         write (b[i],' ',b[ii],' ',n-t);
         halt;
         end;
end.

{$mode objfpc}
var
  i:longint;
  h,n:int64;
  a:array[2..1000000]of boolean;
function kt(x:int64):boolean;
var
  flag:boolean;
  i:longint;
begin
  flag:=x>1;
  for i:=2 to trunc(sqrt(x)) do
    if x mod i=0 then begin flag:=false;break;end;
  kt:=flag;
end;
procedure sang;
var
  i,j:longint;
begin
  for i:=2 to 1000000 do
    for j:=i to 1000000 div i do
      a[i*j]:=true;
end;
begin
  readln(n);
  case n of
      3: begin writeln(1);writeln(3);halt;end;
      4: begin writeln(2);writeln(2,' ',2);halt;end;
      5: begin writeln(1);writeln(5);halt;end;
    end;
  sang;
  if kt(n) then
    begin
      writeln(1);
      writeln(n);
    end
    else
  if n mod 2 =0 then
    begin
      h:=n -2;
      if kt(h) then
        begin
          writeln(2);
          writeln(2,' ',h);
        end
      else
        begin
          writeln(3);
          write(2,' ');
          for i:=2 to 1000000 do
            begin
              if (a[i]=false)and (kt(h-i)) then
              begin
              write(i,' ',h-i);
              halt;
              end;
            end;
        end;
    end
  else
    begin
      h:=n-3;
      if kt(h) then
        begin
          writeln(2);
          writeln(3,' ',h);
        end
      else
        begin
          writeln(3);
          write(3,' ');
          for i:=2 to 1000000 do
            begin
              if (a[i]=false)and (kt(h-i)) then
              begin
              write(i,' ',h-i);
              halt;
              end;
            end;
        end;
    end;
end.

var k,i,j,n,q,s,ans1:integer;
f:boolean;

function isPrime(X: integer): boolean;

var

i: integer;

Begin

     isPrime:=false;

     if not odd(x) and (x<>2) { проверяем на чётность  }

          then exit;

     i:=3;

     while i <= sqrt(x) do { проверяем только нечётные }

     begin

          if x mod i = 0 then Exit;

          inc(i,2);
end;
isPrime:=true;
     End;

 Begin
readln(n);

if isprime(n)=true then Begin writeln(1);write(n); exit; end;

if n=3 then Begin writeln(1);writeln(3); exit; end;
for i:=n-2 downto 1 do
if isprime(i)= true then Begin s:=n-i; break;end;
k:=k+1;
ans1:=i;

for i:=2 to s-1 do
if s mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(2);write(ans1, ' ',s);exit; end;
f:=false;

k:=3;
for i:=2 to s-1 do
if isprime(i)=true  then if isprime(s-i)=true
 then Begin writeln(k);write(ans1,' ',s-i,' ',i); exit;end;

end.

{$mode objfpc}
function prime(x:int64):boolean;
var i:integer;
    flag:boolean;
begin
  flag:=x>1;
  for i:=2 to trunc(sqrt(x)) do
    if x mod i=0 then
      begin
        flag:=false;
        break
      end;
    if flag then prime:=flag
    else prime:= false;
end;
var n,k,j:int64;
    i:integer;
begin
  readln(n);
  if prime(n) then
    begin
      writeln(1);
      writeln(n);
    end
    else
      if prime(n-2) then
      begin
        writeln(2);
        writeln(2,' ',n-2);
      end
      else
      begin
        writeln(3);
        write(3,' ');
        j:=(n-3) div 2;
        k:=j;
        if j mod 2=0 then
        begin
        while (prime(j)=false) or (prime(k)=false) do
        begin
        dec(j); inc(k);
        end;
        end
         else
        begin
        while (prime(k)= false) or (prime(j)=false) do
          begin
            dec(k,2);
            inc(j,2);
          end;
        end;
        writeln(j,' ',k);
      end;
end.

function snt(a:int64):boolean;
var i:longint;
begin
	snt:=true;
	for i:=2 to trunc(SQrt(a)) do if a mod i = 0 then exit(false);
end;
var a,b,c:int64; i:longint;
begin
	read(A);b:=a;
	if snt(a-2) and (a-2<>1) then
	begin
		writeln(2);
		write(2,' ',a-2);
		exit;
	end;
	while (not snt(A)) do a:=a-1;
	if a=b then
	begin
		writeln(1);
		write(A);
	end
	else
	begin
		if b-a=1 then
		begin
			a:=a-1;
			while (not snt(A)) do a:=a-1;
		end;
		writeln(3);
		write(A,' ');
		a:=b-a;
		for i:=2 to a do
		begin
			if (snt(i)) and (snt(a-i)) then
			begin
				write(i,' ',a-i); break;
			end;
		end;
	end;
end.

const fin='';
      fout='';
var n,b,i,a:longint;
procedure nhap;
var f:text;
begin
        assign(f,fin);reset(f);
        readln(f,n);
        close(f);
end;
function ktnt(x:longint):boolean;
var i,j:longint;
begin
        ktnt:=true;
        if x<2 then exit(false);
        for i:=2 to trunc(sqrt(x)) do
            if x mod i=0 then exit(false);
end;
procedure xuat;
var g:Text;
begin
        assign(g,fout);rewrite(g);
        for i:=n-1 downto 1 do
            if ktnt(i) then
                begin
                        a:=i;b:=n-a;
                        break;
                end;
        if n=3 then
            begin
                writeln(g,1);
                writeln(g,n);
            end
        else
        if ktnt(b) then
            begin
                writeln(g,2);
                writeln(g,a,' ',b);
            end
        else
        begin
        writeln(g,3);
        for i:=2 to b div 2 do
            if (ktnt(i))and(ktnt(b-i)) then
                begin
                        writeln(g,a,' ',i,' ',b-i);
                        break;
                end;
        end;
        close(g);
end;
begin
        nhap;
        xuat;
end.

uses math;

var
  n,i,j,cp : longint;
  p : array [1..50] of longint;

function check(x : longint) : boolean;
  var i : longint;
  begin
    if x < 2 then exit(false);
    for i := 2 to trunc(sqrt(x)) do
      if x mod i = 0 then exit(false);
    exit(true);
  end;

begin
  read(n);
  for i := 1 to min(n,200) do
    if check(i) then
      begin
        inc(cp);
        p[cp] := i;
      end;
  if check(n) then
    begin
      writeln(1);
      write(n);
      exit;
    end;
  for i := 1 to cp do
    if check(n - p[i]) then
      begin
        writeln(2);
        write(p[i],' ',n-p[i]);
        exit;
      end;
  for i := 1 to cp do
    for j := 1 to cp do
      if check(n - p[i] - p[j]) then
        begin
          writeln(3);
          write(p[i],' ',p[j],' ',n - p[i] - p[j]);
          exit;
        end;
end.

{$mode objfpc}
program fafa;
var n,k:integer;

function nto(a :integer) :boolean;
var i:integer;
begin
   result:=true;
   for i:=2 to trunc(sqrt(a)) do
     if a mod i =0 then
        begin
          result:=false;
          break;
        end;
end;

begin
  readln(n);
if nto(n) then
 begin
   writeln(1);
   writeln(n);
 end
else
  if n mod 2 = 0 then
   begin
    k:=n div 2;
    repeat
     if nto(k) and nto(n-k) then
        begin
           writeln(2);
           writeln(k,' ',n-k);
           exit;
        end;
     if k mod 2 =0 then k:=k-1 else k:=k-2;
    until 1>2;
   end
  else
    begin
       n:=n-3;
       k:=n div 2;
       repeat
           if nto(k) and nto(n-k) then
        begin
           writeln(3);
           writeln(3,' ',k,' ',n-k);
           exit;
        end;
     if k mod 2 =0 then k:=k-1 else k:=k-2;
       until 1>2;
    end;
end.

const size=1000000;
var
a:array[0..size*2] of boolean;
p:array[0..size] of int64;

procedure init;
var
i:longint;
begin
        for i:=1 to size*2 do
        begin
        a[i]:=true;
        p[i div 2]:=0;
        end;

end;

procedure erat;
var
i,p,t:longint;
begin
        i:=2;
        while i<=size do
        begin
    //    writeln('i before ',i);
                p:=i;
                while p<size do
                begin
                p:=p+i;
       //         writeln('p=',p);
                a[p]:=false;
                end;
                inc(i);
        while not a[i] do
        inc(i);
     //   writeln('after',i);
        end;
end;

function prime(n:longint):boolean;
var
t,i:longint;
begin
        if (n=2) then
                begin
                prime:=true;
                exit;
                end;
t:=trunc(sqrt(n));
        for i:=2 to t+1 do
        if n mod i=0 then
                begin
                prime:=false;
                exit;
                end;
        prime:=true;
end;

procedure even(n:int64; var f,s:int64);
var
i,pos,j:longint;
begin
    pos:=0;
    while n>=p[pos] do
    inc(pos);

    for i:=1 to pos do
    for j:=pos downto 1 do
    if p[i]+p[j]=n then
        begin
        f:=p[i];
        s:=p[j];
        end;

end;

var
i,j,pos:longint;
f,s,t,n:int64;
begin
{
assign(input,'input.txt');
reset(input);
assign(output,'output.txt');
rewrite(output);
}
init;
erat;
pos:=0;
        for i:=2 to size do
        if a[i] then
        begin
        inc(pos);
        p[pos]:=i;
        end;
           //   writeln('max=',p[pos]);
            //  writeln('pos=',pos);
        readln(n);

        if prime(n) then
                begin
                writeln(1);
                writeln(n);
                halt(0);
                end;

        if prime(n-2) then
                begin
                writeln(2);
                writeln(2,' ',n-2);
                halt(0);
                end;

                writeln(3);
                if n<10000 then
                begin
                even(n-3,f,s);
                writeln(3,' ',f,' ',s);
                halt(0);
                end;
                   t:=n;
                while  not prime(t) do
                t:=t-2;
              //  writeln(3);
                even(n-t,f,s);
                writeln(t,' ',f,' ',s);

end.

var d,r:array[0..5000007] of int64;
	z,i,n,x,ind:longint;

procedure resh;
	var j,ii:longint;
begin
	r[1]:=1;
	for ii:=2 to z do
		if r[ii] = 0 then 	begin
								j:=ii+ii;
								while j<=z do
									begin
										r[j]:=ii;
										inc(j,ii);
									end;
							end;
end;

function prov(f:longint):byte;
	var p:byte;
		h:longint;
begin
	p:=0;
	for h:=2 to round(sqrt(f)) do
		if f mod h=0 then begin p:=1; break; end;
	prov:=p;
end;

begin
	z:=5000000;
	fillchar(r,sizeof(r),0);
	resh;
	readln(x);
	if x<4 then begin writeln(1); writeln(x); halt; end;
	ind:=x;
	while ind>=2 do
		begin
			if prov(ind) = 0 then begin
			                        d[1]:=ind;
			                        n:=x-ind;
			                        break;
			                      end;
			dec(ind);
		end;
//	writeln(ind,' ',n);
	if n=0 then begin writeln(1); writeln(d[1]); halt; end;
	if r[n]=0 then begin writeln('2'); writeln(d[1],' ',n); halt; end;
	for i:=1 to z do
		if (r[i]=0) and (r[n-i]=0) then begin writeln(3); write(d[1],' ',i,' ',n-i); halt; end;
end.

var i,n,j:longint;
  pri:array[0..1000000] of boolean;
function prime(loc:longint):boolean;
var i:longint;
begin
  if loc<2 then exit(false);
  if loc=2 then exit(true);
  for i:=2 to trunc(sqrt(loc))do
    if loc mod i=0 then exit(false);
  exit(true);
end;
begin
  readln(n);
  fillchar(pri,sizeof(pri),true);
  for i:=2 to 1000000 do
  begin
    if pri[i]=false then continue;
    j:=i shl 1;
    while j<=1000000 do begin pri[j]:=false;j:=j+i;end;
  end;
  if prime(n)=true then begin writeln(1);writeln(n);halt;end;
  if prime(n-2)=true then begin writeln(2);writeln('2 ',n-2);halt;end;
  if prime(n-4)=true then begin writeln(3);writeln('2 2 ',n-4);halt;end;
  if ((n-2) and 1=0) and (prime((n-2) shr 1)=true) then begin writeln(3);writeln('2 ',(n-2) shr 1,' ',(n-2) shr 1);halt;end;
  for i:=n downto 3 do
    if (i and 1=1) and (prime(i)=true) then break;

  for j:=3 to n do
    if (j and 1=1) and (pri[j]=true) and (pri[n-i-j]=true) then
      begin
       writeln(3);
       writeln(i,' ',j,' ',n-i-j);
       halt;
      end;

end.

program p1;
var n,a,b,c,i,j,k:integer; bo:boolean;
function prost(a:integer):boolean;
var pi:integer;  pb:boolean;
begin                        pb:=true;
if a = 1 then pb:=false
else begin pi:=2;
while ((pi<= sqrt(a)) and (pb ))
 do

 if a mod pi = 0 then pb:=false else pi:=pi+1;
end;
prost:=pb;
end;

begin
readln(n);
a:=0; b:=0; c:=0;
bo:=true; i:=n;
while (i<>0) and bo
 do
 begin
 if prost(i) then
   for j:=0 to n-i
     do
     if prost(j) and prost(n-i-j) then begin bo:=false; a:= i; b:=j; c:= n-i-j; end;
 i:=i-1;
 end;
 k:=3;
if a = 0 then k:=k-1;
if b=0 then k:=k-1;
if c=0 then k:=k-1;
writeln(k);
if a<>0 then write(a,' ');
if b<>0 then write(b,' ');
if c<>0 then write(c);
end.

Program ILoveYou;
VAR n,i,prime:int64;

function Prim(x : int64) : boolean;
VAR i:int64;
Begin

Prim:=true;
i:=2;
while (i <= sqrt(x)) do
Begin
if ((x mod i) = 0) then Begin Prim:=false; i:=x; end;
i:=i + 1;
end;

end;

Begin

Readln(n);
if (Prim(n)) then
Begin
Writeln('1');
Writeln(n);
end else
Begin

if (Prim(n - 2)) then
Begin

Writeln('2');
Writeln(n,' ',n - 2);

end else
Begin

Writeln(3);
i:=n - 4;
while (not (Prim(i))) do
Begin
i:=i - 2;
end;

Write(i,' ');
n:=n - i;
for i:=2 to n do
Begin
if (Prim(i)) and (Prim(n - i)) then break;
end;

Writeln(i,' ',n - i);

end;

end;

Readln;
END.

const eps=0.0000000001;  besk=20000000000008;  nn=200000;
   label 1,2,3,4;
    type    real=extended;  {string=ansistring;}
  {  mas=array [-10..nn] of int64; }  point=record x,y,z:real;end;
    zap=record p1,p2,p3 :int64;end; zap1=^zap;
   { mass1=^mass; }
    var qsum,nado,otfinish,ott,p,qq,kk,cc,pp,rr,v1,v2,kol,k1,ii,jj,q,pos,z,pmax,imax,p1,p2,p3,p4,l,ot,nm,s1,s2,m,s,smin,cen,dl,t2,i1:int64;
    t,mask,n,k,h,step,i,j:longint;
    i2,oldot,tt,modul,aaa,bbb, aa,bb,ccc:int64;
    xnew,xold, bold,bnew,r,x,y,d,c,aold,b,a:array[-1000..500000] of int64;
     marked:array[-10..300030] of boolean;
   dd:array[-1..10,-10..20000] of int64;
    sss, ss1,ss2:string;
    sst,st:array [-10..1000000] of char;
     zan1,zan2,zan,fl:array[-10..200000] of boolean;
    ss:string;ch:char;
   mm,matr,ddp, pole :array [-10..100,-10..100] of char;
   sm:array[-10..100,-10..100,-10..100] of int64;
    maxpr:array[0..nn] of string;
    st2:array[0..nn] of string;
     left,right,v0,s0,t0:extended;
     zv:point;
     newx,newy,xx,yy:array[-1..200000] of int64;

     yot:double;
       flag,flag1:boolean;
    function al(x,y:real):real; var t0,t1,p,s0,s1:real;
 begin
     if (x>0)and(y>=0) then p:=arctan(y/x);
     if x<0 then p:=pi+arctan(y/x);
     if(x>0)and(y<0) then p:=2*pi+arctan(y/x);
     if x=0 then if (y>=0) then p:=pi/2 else p:=3*pi/2;
     al:=p/pi*180;
 end;
  function min(x,y:int64):int64;begin min:=x;if y<x then min:=y; end;
  function max(x,y:int64):int64;begin max:=x;if y>x then max:=y; end;

  function nod(x,y:int64):int64; var z:int64;
begin   repeat  z:=x mod y;x:=y;y:=z;   until  z=0 ;  nod:=x;end;

function degg(p,deg:int64):int64; var pp,q:int64;
 begin if deg=0 then degg:=1 else begin   if odd(deg) then degg:=degg(p,deg-1)*p mod modul else
 begin q:=(degg(p,deg shr 1)) mod modul; degg:=(q*q) mod modul;   end; end;   end;

function prost(t:longint):boolean;
label 234;
 var i,j:longint;  fl:boolean;
begin
   fl:=true;
   if t<=1 then fl:=false;
   i:=1; while (i*i<=t) do
     begin
        inc(i);
        if (t mod i=0)and(i<>t) then
       begin
        fl:=false; goto 234;
       end;
     end;
234: prost:=fl;
end;

begin
  {  assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
   }
   read(n);
   if (n=3)or(n=5) then begin  writeln(1); write(n); goto 1;  end;
   if (n=4) then begin  writeln(2); write(2,' ',2); goto 1; end;

    if n<1000 then
      begin
         for i:=1 to n do for j:=1 to n-i do
           begin
              k:=n-i-j;
               if prost(i) and prost(j) and prost(k) then
               begin writeln(n,' ',3);
                 writeln(i,' ',j,' ',k);  goto 1;
               end;
           end;

      end;

   for k:=6 to 100000 do
   begin
    { writeln() }
     if prost(n-k) and not odd(k) then
       begin
          writeln(3);
          write(n-k,' ');
          for i:=1 to k do if prost(i) and prost(k-i) then
            begin  write(i, ' ',k-i); goto 1;     end;

       end;
   end;

   1:          close(output);

end.

Var
  n,i,j:longint;
Function F(n:longint):boolean;
Var
  i,g:longint;
Begin
  if n=2 then
    begin
      result:=true;
      exit;
    end;
  if n mod 2=0 then
    begin
      result:=false;
      exit;
    end;
  g:=round(sqrt(n)+2);
  i:=3;
  result:=true;
  while i<=g do
    begin
      if n mod i=0 then
        begin
          result:=false;
          break;
        end;
      inc(i,2);
    end;
end;
begin
//  assign(input,'input.txt');assign(output,'output.txt');
  readln(n);
  if f(n) then
    begin
      writeln(1);
      writeln(n);
      halt(0);
    end;
  for i:=n downto 1 do
    if f(i) then
      begin
        if f(n-i) then
          begin
            writeln(2);
            writeln(i,' ',n-i);
          end;
        for j:=2 to n-i do
          if  f(j)and f(n-i-j) then
            begin
              writeln(3);
              writeln(i,' ',j,' ',n-i-j);
              halt(0);
            end;
      end;
end.

Var
  n,i,j:longint;
Function F(n:longint):boolean;
Var
  i,g:longint;
Begin
  if n=2 then
    begin
      result:=true;
      exit;
    end;
  if (n mod 2=0)or(n=1) then
    begin
      result:=false;
      exit;
    end;
  g:=round(sqrt(n)+2);
  i:=3;
  result:=true;
  while i<=g do
    begin
      if n mod i=0 then
        begin
          result:=false;
          break;
        end;
      inc(i,2);
    end;
end;
begin
//  assign(input,'input.txt');assign(output,'output.txt');
  readln(n);
  if f(n) then
    begin
      writeln(1);
      writeln(n);
      halt(0);
    end;
  for i:=n downto 1 do
    if f(i) then
      begin
        if f(n-i) then
          begin
            writeln(2);
            writeln(i,' ',n-i);
            halt(0);
          end;
        for j:=2 to n-i do
          if  f(j)and f(n-i-j) then
            begin
              writeln(3);
              writeln(i,' ',j,' ',n-i-j);
              halt(0);
            end;
      end;
end.

var a,b:array[1..300]of longint;
    n,t,i,ii,j:longint;
function prost(x:longint):boolean;
   var  i:longint;
   begin
   i:=2;
   prost:=true;
   while i*i<=x do
      begin
      if x mod i =0 then prost:=false;
      inc(i);
      end;
   end;
begin
read(n);
if prost(n) then begin writeln(1);write(n); halt end else writeln(3);
t:=n-2;
while not(prost(t)) do dec(t);
t:=n-t;
for i:=2 to t do
   if a[i]=0 then
      begin
      j:=i+i;
      while j<=t do
         begin
         a[j]:=1;
         inc(j,i);
         end;
      end;
j:=0;
for i:=2 to t do
   if a[i]=0 then
       begin
       inc(j);
       b[j]:=i;
       end;
for i:=1 to j do
   for ii:=i to j do
      if b[i]+b[ii]=t then
         begin
         write (b[i],' ',b[ii],' ',n-t);
         halt;
         end;
end.

var n,m,i,k,j,ans,lik,ii,jj,ans1:longint;
begin
readln(n);
for i:=n downto n-300 do
begin
m:=i;
ans:=0;
for j:=1 to trunc(sqrt(m)) do
if (j*j=m) then inc(ans) else
if (m mod j=0) then inc(ans,2);
if (ans=2) then begin lik:=i;break;end;
end;

for ii:=2 to 300 do
for jj:=2 to 300 do
begin
m:=ii;
ans:=0;
for j:=1 to trunc(sqrt(m)) do
if (j*j=m) then inc(ans) else
if (m mod j=0) then inc(ans,2);
m:=jj;
ans1:=0;
for j:=1 to trunc(sqrt(m)) do
if (j*j=m) then inc(ans1) else
if (m mod j=0) then inc(ans1,2);
if (ans=2)and(ans1=2)and(lik+ii+jj=n) then begin writelN(lik,' ',ii,' ',jj);halt;end;
end;

end.

Const
  Fi='';//584D.INP';
  Fo='';//584D.OUT';

Var n:Longint;
    Res:Array[0..3] of Longint;

Function  Check(x:Longint):Boolean;
Var i:Longint;
Begin
  If x<=1 then Exit(False);
  If (x Mod 2=0) or (x Mod 3=0) then Exit(False);

  For i:=2 to Trunc(Sqrt(x)) do
    If x Mod i=0 then Exit(False);
  Exit(True);
End;

Procedure Find(i,k:Longint);
Var j,k1:Longint;
Begin
  If i>3 then Exit;

  If Check(k) then
    Begin
      Res[i]:=k;
      Writeln(i);
      For j:=1 to i do
        Write(Res[j],' ');
      Halt;
    End;

  k1:=k-2;
  While k1>0 do
    Begin
      If Check(k1) then
        Begin
          Res[i]:=k1;
          Find(i+1,k-k1);
        End;
      Dec(k1);
    End;
End;

BEGIN
  Assign(Input,Fi); Reset(Input);
  Assign(Output,Fo); Rewrite(Output);

  Readln(n);
  Find(1,n);

  Close(Input);
  Close(Output);
END.

var i,k,n:integer; c:string; a:array[0..100000000]of 0..1;
procedure pr(t,k:integer; s:string);
var j:integer;
begin
if (t=4)and(k=0) then begin delete(s,length(s),1); writeln(s); halt; end
else begin
for j:=2 to n do
if (a[j]=0)and(k-a[j]>=0) then begin str(j,c); pr(t+1,k-j,s+c+' '); end;
end;
end;
begin
readln(n);
i:=2;
repeat
if a[i]=0 then begin k:=i;
while k<=n do
begin
k:=k+i;
a[k]:=1;
end;
end;
i:=i+1;
until i>=n;
pr(1,n,'');
end.

var
 i,j,n,m,k,t,x,z:longint;
 ff:boolean;
 a:array[0..22]of longint;
begin
 readln(n);
 for z:=2 downto 0 do
 begin
  i:=n-z*2;
  while i>=2 do
  begin
   ff:=false;
   j:=2;
   while j<=trunc(sqrt(i)) do if i mod j=0 then
   begin
    ff:=true;
    break;
   end else inc(j);
   if not ff then
   begin
    dec(n,i);
    a[z]:=i;
    break;
   end;
   dec(i);
  end;
 end;
 k:=0;
 for z:=0 to 2 do if a[z]>0 then inc(k);
 writeln(k);
 for z:=0 to 2 do if a[z]>0 then write(a[z],' ');
 writeln;
end.

Const Fi='';
      Fo='';
      maxN=50000;
Function  Check(k:Longint):Boolean;
Var i:Longint;
  Begin
    If k=1 then Exit(False);
    For i:=2 to Trunc(Sqrt(k)) do
      If k mod i=0 then Exit(False);
    Exit(True);
  End;
Procedure Enter;
Var n,i:Longint;
  Begin
    Readln(n);
    If Check(n) then
      Begin
        Writeln(1);
        Writeln(n);
        Exit;
      End;
    If Check(n-2) then
      Begin
        Writeln(2);
        Writeln(2,' ',n);
        Exit;
      End;
    For i:=3 to maxN do
      If Check(i) and Check((n-i) Div 2) then
        Begin
          Writeln(3);
          Writeln(i,' ',(n-i) Div 2,' ',(n-i) Div 2);
          Exit;
        End;
  End;
Begin
  Assign(Input,Fi);Reset(Input);
  Assign(Output,Fo);Rewrite(Output);
  Enter;
  Close(Input);Close(Output);
End.

Const Fi='';
      Fo='';
      maxN=50000;
Function  Check(k:Longint):Boolean;
Var i:Longint;
  Begin
    If k=1 then Exit(False);
    For i:=2 to Trunc(Sqrt(k)) do
      If k mod i=0 then Exit(False);
    Exit(True);
  End;
Procedure Enter;
Var n,i:Longint;
  Begin
    Readln(n);
    If Check(n) then
      Begin
        Writeln(1);
        Writeln(n);
        Exit;
      End;
    If Check(n-2) then
      Begin
        Writeln(2);
        Writeln(2,' ',n);
        Exit;
      End;
    For i:=3 to maxN do
      If Odd(i) and Check(i) and Check((n-i) Div 2) then
        Begin
          Writeln(3);
          Writeln(i,' ',(n-i) Div 2,' ',(n-i) Div 2);
          Exit;
        End;
  End;
Begin
  Assign(Input,Fi);Reset(Input);
  Assign(Output,Fo);Rewrite(Output);
  Enter;
  Close(Input);Close(Output);
End.

{$mode objfpc}
const fi='DD.inp';
      fo='DD.out';
      nmax=round(1E5);
var n:integer;
function check(k:integer) :boolean;
   var i:integer;
   begin
       for i:=2 to trunc(sqrt(k)) do
         if k mod i=0 then exit(false) ;
       exit(true);
   end;
procedure main;
   var i:integer;
   begin
       readln(n);
       if check(n) then
         begin
           writeln(1);
           writeln(n) ;
         end;
       if check(n-2) then
         begin
           writeln(2);
           writeln(2,' ',n-2) ;
         end;
       for i:=3 to nmax do
         if check(i) and (check((n-i)div 2))  then
           begin
             writeln(3);
             writeln(i,' ',(n-i) div 2,' ',(n-i)div 2);
             break;
           end;
  end;
BEGIN
   main;
END.

var
n,i:longint;
function aval(a:longint):boolean;
var
i:longint;
begin
if(a=1) then exit(false);
for i:=2 to round(sqrt(a)) do if(a mod i=0) then exit(false);
exit(true);
end;
begin
readln(n);
if(n=3) then begin writeln(1); writeln(3); halt; end;
if(n=5) then begin writeln(1); writeln(5); halt; end;
for i:=1 to n do
begin
if(aval(i)) and (aval((n-i) div 2)) and ((n-i) mod 2=0)
then begin writeln(3); write(i,' ',(n-i) div 2,' ',(n-i) div 2);  halt; end;
writeln(aval(i));
writeln(aval((n-i)div 2));
end;
end.

var
  n,i,x,y,z : longint;

  function pr(x : longint) : boolean;
    var
      i : longint;
    begin
      if x = 1 then exit(false);
      if x = 2 then exit(true);
      for i:=2 to trunc(sqrt(x))+5 do
        if x mod i = 0 then exit(false);
      exit(true);
    end;

begin
  readln(n);
  if pr(n) then begin writeln(1); writeln(n); halt; end;
  if n mod 2 = 1 then begin
    if pr(n-2) then begin
      writeln(2);
      writeln(n-2,' ',2);
      halt;
    end;
    for i:=3 to n do
      if pr(i) then begin
        x:=(n-i) div 2; y:=x;
        while (not pr(x)) and (not pr(y)) and (x > 1) do begin
          dec(x);
          inc(y);
        end;
        if (x > 1) then begin
          writeln(3);
          writeln(i,' ',x,' ',y);
          halt;
        end;
      end;
  end else begin
    x:=n div 2; y:=x;
    while (not pr(x)) and (not pr(y)) do begin
      dec(x);
      inc(y);
    end;
    writeln(2);
    writeln(x,' ',y);
  end;
end.

var
  n,i,x,y,z : longint;

  function pr(x : longint) : boolean;
    var
      i : longint;
    begin
      if x = 1 then exit(false);
      if x = 2 then exit(true);
      for i:=2 to trunc(sqrt(x))+1 do
        if x mod i = 0 then exit(false);
      exit(true);
    end;

begin
  readln(n);
  if pr(n) then begin writeln(1); writeln(n); halt; end;
  if n mod 2 = 1 then begin
    if pr(n-2) then begin
      writeln(2);
      writeln(n-2,' ',2);
      halt;
    end;
    for i:=3 to n do
      if pr(i) then begin
        x:=(n-i) div 2; y:=x;
        while (not pr(x)) and (not pr(y)) and (x > 1) do begin
          dec(x);
          inc(y);
        end;
        if (x > 1) then begin
          writeln(3);
          writeln(i,' ',x,' ',y);
          halt;
        end;
      end;
  end else begin
    x:=n div 2; y:=x;
    while (not pr(x)) and (not pr(y)) do begin
      dec(x);
      inc(y);
    end;
    writeln(2);
    writeln(x,' ',y);
  end;
end.

{ct nt}
function nt(a:longint):boolean;
 var i:longint;
 begin
  if a<2 then exit(false);
  if (a=2)or(a=3)or(a=5)or(a=7) then exit(true);
  if (a mod 2=0)or(a mod 3=0) then exit(false);
  nt:=true;
  i:=1;
  while i<round(sqrt(a)) do
  begin
   i:=i+2;
   if a mod i=0 then exit(false);
  end;
 end;
{ct c}
var n,i,t:longint;
 begin
   readln(n);
   if nt(n) then
    begin
     writeln(1);
     writeln(n);
     readln;
     exit;
    end;
   if nt(n-2) then
    begin
     writeln(2);
     writeln(2,' ',n-2);
     readln;
     exit;
    end;
   for i:=n downto 2 do
    if nt(i) then
     begin
      t:=i;
      break;
     end;
    n:=n-t;
    for i:=2 to n do
     if nt(n-i) then
      begin
       writeln(3);
       writeln(i,' ',n-i,' ',t);
       readln;
       exit;
      end;
  readln
 end.

Program _1;
Var
   n,a1,a2,a3,kol:longint;
Function prost(n:longint):boolean;
Var
   i:longint;
Begin
   if n=1 then prost:=false;
   if odd(n) then begin
   i:=3;
   while i<=round(sqrt(n)) do begin
             if n mod i=0 then begin
                 prost:=false;
                 exit;
                 end;
             inc(i,2);
             prost:=true;
             end;
   end
   else if n=2 then prost:=true
      else prost:=true;
End;
Begin
   {assign(input,'input.txt');
   assign(output,'output.txt');
   reset(input);
   rewrite(output);}
   read(n);
   a1:=3;
   a2:=0;
   a3:=0;
   kol:=1;
   n:=n-3;
   if n=0 then begin
               writeln(kol);
               write(a1);
               exit;
               end;
   if n=2 then begin
               writeln(2);
               write(a1,' 2');
               exit;
               end;
   if n=4 then begin
               writeln(3);
               write(a1,' 2 2');
               exit;
               end;
   a2:=n div 2;
   if not odd(a2) then begin
                       dec(a2);
                       a3:=a2+2;
                       end
   else a3:=a2;
   while (not prost(a3))and(not prost(a2)) do begin
      dec(a2,2);
      inc(a3,2);
   end;
   writeln(3);
   write(a1,' ',a2,' ',a3);
   {close(input);
   close(output);}
End.

program summa_prostych;
var n,i,t,n1,n2,n3,k,t1,t2,nn:longint;

function prost(var x:longint):boolean;
        var j,kol:longint;
begin
kol:=0;
for j:=1 to trunc(sqrt(x)) do
if x mod j=0 then inc(kol);
if kol=1 then prost:=true else prost:=false;

end;

begin
readln(n);

if prost(n)=true then begin writeln(1); writeln(n); halt; end;

for i:=n downto n-300 do
begin
t:=i;
if prost(t)=true then begin
                      n1:=t;
                      break;
                      end;

end;
  nn:=n-n1;

  if prost(nn)=true then begin writeln(2); writeln(nn,' ',n1); halt; end;

 for i:=1 to n-n1 do
 for k:=1 to n-n1 do
 begin
 t1:=i;
 t2:=k;
 if (prost(t1)=true) and (prost(t2)=true) and((t1+t2+n1)=n) then begin n2:=t1; n3:=t2; break; end;
 end;

writeln(3);
writeln(n1,' ',n2,' ',n3);
end.

{$mode objfpc}
uses
        math;
const
        ip = '';
        op = '';
        e5 = round(1e5);
        e6 = round(1e6);
var
        fi, fo: text;
        cnt, N: integer;
        res: array[1..3] of integer;

procedure enter;
begin
        assign(fi, ip); reset(fi);
        assign(fo, op); rewrite(fo);
        readln(fi, N);
end;

function pr(x: integer): boolean;
var
        i: integer;
begin
        pr := true;
        for i := 2 to trunc(Sqrt(x)) do
                if x mod i = 0 then exit(false);
end;
procedure solve;
var
        a, b, i: integer;
begin
        cnt := 0;
        if pr(n) then
        begin
                writeln(1);
                writeln(n);
                exit
        end;
        if odd(n) then
        begin
                inc(cnt);
                res[cnt] := 3;
                dec(n, 3);
        end;
        a := ceil(n/2); b := trunc(n/2);
        while (not pr(a)) and (not pr(b)) do
        begin
                inc(a);
                dec(b);
        end;
        inc(cnt); res[cnt] := a;
        inc(cnt); res[cnt] := b;
        writeln(cnt);
        for i := 1 to cnt do
                write(res[i], ' ');
        writeln
end;

procedure clean;
begin
        close(fi); close(fo);
end;

begin
        ENTER;
        SOLVE;
        CLEAN;
end.

{$mode objfpc}
uses
        math;
const
        ip = '';
        op = '';
        e5 = round(1e5);
        e6 = round(1e6);
var
        fi, fo: text;
        cnt, N: integer;
        res: array[1..3] of integer;

procedure enter;
begin
        assign(fi, ip); reset(fi);
        assign(fo, op); rewrite(fo);
        readln(fi, N);
end;

function pr(x: integer): boolean;
var
        i: integer;
begin
        pr := true;
        for i := 2 to trunc(Sqrt(x)) do
                if x mod i = 0 then exit(false);
end;
procedure solve;
var
        a, b, i: integer;
begin
        cnt := 0;
        if pr(n) then
        begin
                writeln(1);
                writeln(n);
                exit
        end;
        if odd(n) then
        begin
                inc(cnt);
                res[cnt] := 3;
                dec(n, 3);
        end;
        a := ceil(n/2); b := trunc(n/2);
        while (not pr(a)) and (not pr(b)) do
        begin
                inc(a);
                dec(b);
        end;
        inc(cnt); res[cnt] := a;
        inc(cnt); res[cnt] := b;
        for i := 1 to cnt do
                write(res[i], ' ');
        writeln
end;

procedure clean;
begin
        close(fi); close(fo);
end;

begin
        ENTER;
        SOLVE;
        CLEAN;
end.

const fi = 'dima.inp';
      fo = 'dima.out';

var n,i : longint;

procedure mt;
begin
   assign(input,fi); reset(input);
   assign(output,fo); rewrite(output);
end;

procedure dt;
begin
  close(input); close(output);
end;

function nt(m:longint) : boolean;
var i : longint;
begin
  if m = 1 then exit(false);
  for i := 2 to trunc(sqrt(m)) do
    if m mod i = 0 then exit(false);
  exit(true);
end;

procedure xuli;
begin
  read(n);
  if nt(n) then begin writeln(1); write(n); halt; end;
  for i := 1 to n div 2 do
    begin
      if nt(i) and nt(n-i) then
        begin
          writeln(2); write(i,' ',n-i); halt;
        end;
    end;
end;

BEGIN
  //mt;
  xuli;
  //dt;
END.

var k,i,j,n,q,s,ans1:integer;
f:boolean;
 Begin
readln(n);

for i:=2 to n div 2 +1 do
if n mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(1);write(n);exit; end;
f:=false;

if n=3 then Begin writeln(1);writeln(3); exit; end;
for i:=n-2 downto 1 do
Begin
for j:=2 to i div 2 +1 do
if i mod j=0 then Begin f:=true;break;end;
if f=false then Begin  s:=n-i;break;end;
f:=false;
end;
k:=k+1;
ans1:=i;

for i:=2 to s-1 do
if s mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(2);write(ans1, ' ',s);exit; end;
f:=false;

k:=3;
 for i:=2 to s-1 do
 Begin
 for j:=i-1  downto (i-1) div 2    do
 if i mod j =0 then Begin f:=true;break;end;
 if f=false then
 Begin
 for j:=s-i-1 downto (s-i-1) div 2   do
 if (s-i) mod j =0 then Begin f:=true;break;end;
 if f=false then Begin writeln(k);write(ans1,' ',s-i,' ',i); exit;end
 else   f:=false;
end;
f:=false;
end;

end.

var k,i,j,n,q,s,ans1:integer;
f:boolean;
 Begin
readln(n);

for i:=2 to n div 2 +1 do
if n mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(1);write(n);exit; end;
f:=false;

if n=3 then Begin writeln(1);writeln(3); exit; end;
for i:=n-2 downto 1 do
Begin
for j:=2 to i div 2 +1 do
if i mod j=0 then Begin f:=true;break;end;
if f=false then Begin  s:=n-i;break;end;
f:=false;
end;
k:=k+1;
ans1:=i;

for i:=2 to s-1 do
if s mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(2);write(ans1, ' ',s);exit; end;
f:=false;

k:=3;
 for i:=2 to s-1 do
 Begin
 for j:=i-1  downto (i-1) div 2 +1   do
 if i mod j =0 then Begin f:=true;break;end;
 if f=false then
 Begin
 for j:=s-i-1 downto (s-i-1) div 2 +1  do
 if (s-i) mod j =0 then Begin f:=true;break;end;
 if f=false then Begin writeln(k);write(ans1,' ',s-i,' ',i); exit;end
 else   f:=false;
end;
f:=false;
end;

end.

var k,i,j,n,q,s,ans1:longint;
f:boolean;
 Begin
readln(n);

for i:=2 to n div 2 +1 do
if n mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(1);write(n);exit; end;
f:=false;

if n=3 then Begin writeln(1);writeln(3); exit; end;
for i:=n-2 downto 1 do
Begin
for j:=2 to i div 2 +1 do
if i mod j=0 then Begin f:=true;break;end;
if f=false then Begin  s:=n-i;break;end;
f:=false;
end;
k:=k+1;
ans1:=i;

for i:=2 to s-1 do
if s mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(2);write(ans1, ' ',s);exit; end;
f:=false;

for i:=s-2  downto 2 do
Begin
for j:=3  to i-1 do
if (i mod j=0) then Begin f:=true;break;end;
if f=false then Begin  q:=s-i;break;end;
f:=false;
end;
if i<>0 then k:=k+1;
if q <>0 then k:=k+1;
writeln(k);
write(ans1,' ',q,' ',i);

end.

var k,i,j,n,q,s,ans1:integer;
f:boolean;
 Begin
readln(n);

for i:=2 to n div 2 +1 do
if n mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(1);write(n);exit; end;
f:=false;

if n=3 then Begin writeln(1);writeln(3); exit; end;
for i:=n-2 downto 1 do
Begin
for j:=2 to i div 2 +1 do
if i mod j=0 then Begin f:=true;break;end;
if f=false then Begin  s:=n-i;break;end;
f:=false;
end;
k:=k+1;
ans1:=i;

for i:=2 to s-1 do
if s mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(2);write(ans1, ' ',s);exit; end;
f:=false;

for i:=s-2  downto 2 do
Begin
for j:=2  to i-1 do
if (i mod j=0) then Begin f:=true;break;end;
if f=false then Begin  q:=s-i;break;end;
f:=false;
end;
if i<>0 then k:=k+1;
if q <>0 then k:=k+1;
writeln(k);
write(ans1,' ',q,' ',i);

end.

var k,i,j,n,q,s,ans1:integer;
f:boolean;
 Begin
readln(n);

for i:=2 to n-1 do
if n mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(1);write(n);exit; end;
f:=false;

if n=3 then Begin writeln(1);writeln(3); exit; end;
for i:=n-2 downto 1 do
Begin
for j:=2 to i div 2 +1 do
if i mod j=0 then Begin f:=true;break;end;
if f=false then Begin  s:=n-i;break;end;
f:=false;
end;
k:=k+1;
ans1:=i;

for i:=2 to s-1 do
if s mod i =0 then  Begin f:=true; break end;
if f=false then Begin  writeln(2);write(ans1, ' ',s);exit; end;
f:=false;

for i:=s-2  downto 2 do
Begin
for j:=3  to i do
if (i mod j=0) then Begin f:=true;break;end;
if f=false then Begin  q:=s-i;break;end;
f:=false;
end;
if i<>0 then k:=k+1;
if q <>0 then k:=k+1;
writeln(k);
write(ans1,' ',q,' ',i);

end.

function snt(a:int64):boolean;
var i:longint;
begin
	snt:=true;
	for i:=2 to trunc(SQrt(a)) do if a mod i = 0 then exit(false);
end;
var a,b,c:int64; i:longint;
begin
	read(A);b:=a;
	if snt(a-2) then
	begin
		writeln(2);
		write(2,' ',a-2);
		exit;
	end;
	while (not snt(A)) do a:=a-1;
	if a=b then
	begin
		writeln(1);
		write(A);
	end
	else
	begin
		if b-a=1 then
		begin
			a:=a-1;
			while (not snt(A)) do a:=a-1;
		end;
		writeln(3);
		write(A,' ');
		a:=b-a;
		for i:=2 to a do
		begin
			if (snt(i)) and (snt(a-i)) then
			begin
				write(i,' ',a-i); break;
			end;
		end;
	end;
end.

const fin='';
      fout='';
var n,b,i,a:longint;
procedure nhap;
var f:text;
begin
        assign(f,fin);reset(f);
        readln(f,n);
        close(f);
end;
function ktnt(x:longint):boolean;
var i,j:longint;
begin
        ktnt:=true;
        if x<2 then exit(false);
        for i:=2 to trunc(sqrt(x)) do
            if x mod i=0 then exit(false);
end;
procedure xuat;
var g:Text;
begin
        assign(g,fout);rewrite(g);
        for i:=n-1 downto 1 do
            if ktnt(i) then
                begin
                        a:=i;b:=n-a;
                        break;
                end;
        if n=3 then
            begin
                writeln(g,1);writeln(g,n);
            end else
        if n=5 then
            begin
                writeln(g,2);
                writeln(g,2,' ',3);
            end else
            begin
            writeln(g,3);
        for i:=2 to b div 2 do
            if (ktnt(i))and(ktnt(b-i)) then
                begin
                        writeln(g,a,' ',i,' ',b-i);
                        break;
                end;
            end;;
        close(g);
end;
begin
        nhap;
        xuat;
end.

{$mode objfpc}
function prime(x:int64):boolean;
var i:integer;
    flag:boolean;
begin
  flag:=x>1;
  for i:=2 to trunc(sqrt(x)) do
    if x mod i=0 then
      begin
        flag:=false;
        break
      end;
    if flag then prime:=flag
    else prime:= false;
end;
var n,k,j:int64;
    i:integer;
begin
  readln(n);
  if prime(n) then
    begin
      writeln(1);
      writeln(n);
    end
    else
      if prime(n-2) then
      begin
        writeln(2);
        writeln(2,' ',n-2);
      end
      else
      begin
        writeln(3);
        write(3,' ');
        j:=(n-3) div 2;
        k:=j;
        if j mod 2=0 then
        begin
        while prime(k)=false do
        begin
        dec(j); inc(k);
        end;
        end
         else
        begin
        while (prime(k)= false)  do
          begin
            dec(k,2);
            inc(j,2);
          end;
        end;
        writeln(j,' ',k);
      end;
end.

{$mode objfpc}
function prime(x:int64):boolean;
var i:integer;
    flag:boolean;
begin
  flag:=x>1;
  for i:=2 to trunc(sqrt(x)) do
    if x mod i=0 then
      begin
        flag:=false;
        break
      end;
    if flag then prime:=flag
    else prime:= false;
end;
var n,k,j:int64;
    i:integer;
begin
  readln(n);
  if prime(n) then
    begin
      writeln(1);
      writeln(n);
    end
    else
      if prime(n-2) then
      begin
        writeln(2);
        writeln(2,' ',n-2);
      end
      else
      begin
        writeln(3);
        write(3,' ');
        j:=(n-3) div 2;
        k:=j;
        if j mod 2=0 then
        begin
        while prime(j)=false do
        begin
        dec(j); inc(k);
        end;
        end
         else
        begin
        while (prime(k)= false)  do
          begin
            dec(k,2);
            inc(j,2);
          end;
        end;
        writeln(j,' ',k);
      end;
end.

{$mode objfpc}
function prime(x:int64):boolean;
var i:integer;
    flag:boolean;
begin
  flag:=x>1;
  for i:=2 to trunc(sqrt(x)) do
    if x mod i=0 then
      begin
        flag:=false;
        break
      end;
    if flag then prime:=flag
    else prime:= false;
end;
var n,k:int64;
    i:integer;
begin
  readln(n);
  if prime(n) then
    begin
      writeln(1);
      writeln(n);
    end
    else
      if prime(n-2) then
      begin
        writeln(2);
        writeln(2,' ',n-2);
      end
      else
      begin
        writeln(3);
        write(3,' ');
        n:=n-3;
        k:=n;
        while prime(k)= false do
          dec(k);
        write(n-k,' ',k);
      end;
end.

{$mode objfpc}
var n,k:int64;
    i,j:integer;
    a:array [1..1000000] of boolean;
begin
  readln(n);
  writeln(3);
  if n mod 2 =0 then
  begin write(2,' '); n:=n-2; k:=n-2; end
  else
  begin write(3,' '); n:=n-3; k:=n-3; end;
  fillchar(a,sizeof(a),true);
  for i:= 2 to trunc(sqrt(n)) do
    if a[i] then
      for j:=i to n div i do
        a[i*j]:=false;
  while a[k]=false do
    dec(k);
  write(k,' ',n-k);
end.

{$mode objfpc}
function prime(x:int64):boolean;
var i:integer;
    flag:boolean;
begin
  flag:=x>1;
  for i:=2 to trunc(sqrt(x)) do
    if x mod i=0 then
      begin
        flag:=false;
        break
      end;
    if flag then prime:=flag
    else prime:= false;
end;
var n,k,j:int64;
    i:integer;
begin
  readln(n);
  if prime(n) then
    begin
      writeln(1);
      writeln(n);
    end
    else
      if prime(n-2) then
      begin
        writeln(2);
        writeln(2,' ',n-2);
      end
      else
      begin
        writeln(3);
        write(3,' ');
        j:=(n-3) div 2;
        k:=j;
        if j mod 2=0 then begin dec(j); inc(k); end
        else
        begin
        while (prime(k)= false)  do
          begin
            dec(k,2);
            inc(j,2);
          end;
        end;
        writeln(j,' ',k);
      end;
end.

var d,r:array[0..5000007] of int64;
	z,i,n,x,ind:longint;

procedure resh;
	var j,ii:longint;
begin
	r[1]:=0;
	for ii:=2 to z do
		if r[ii] = 0 then 	begin
								j:=ii+ii;
								while j<=z do
									begin
										r[j]:=ii;
										inc(j,ii);
									end;
							end;
end;

function prov(f:longint):byte;
	var p:byte;
		h:longint;
begin
	p:=0;
	for h:=2 to round(sqrt(f)) do
		if f mod h=0 then begin p:=1; break; end;
	prov:=p;
end;

begin
	z:=5000000;
	fillchar(r,sizeof(r),0);
	resh;
	readln(x);
	if x<4 then begin writeln(1); writeln(x); halt; end;
	ind:=x;
	while ind>=2 do
		begin
			if prov(ind) = 0 then begin
			                        d[1]:=ind;
			                        n:=x-ind;
			                        break;
			                      end;
			dec(ind);
		end;
//	writeln(ind,' ',n);
	if n=0 then begin writeln(1); writeln(d[1]); halt; end;
	if r[n]=0 then begin writeln('2'); writeln(d[1],' ',n); halt; end;
	for i:=1 to z do
		if (r[i]=0) and (r[n-i]=0) then begin writeln(3); write(d[1],' ',i,' ',n-i); halt; end;
end.

var i,n,j:longint;
  pri:array[0..1000000] of boolean;
function prime(loc:longint):boolean;
var i:longint;
begin
  if loc<2 then exit(false);
  if loc=2 then exit(true);
  for i:=2 to trunc(sqrt(loc))do
    if loc mod i=0 then exit(false);
  exit(true);
end;
begin
  readln(n);
  fillchar(pri,sizeof(pri),true);
  for i:=2 to 1000000 do
  begin
    if pri[i]=false then continue;
    j:=i shl 1;
    while j<=1000000 do begin pri[j]:=false;j:=j+i;end;
  end;
  if prime(n)=true then begin writeln(1);writeln(n);halt;end;
  if prime(n-2)=true then begin writeln(2);writeln('2 ',n-2);halt;end;
  if prime(n-4)=true then begin writeln(3);writeln('2 2 ',n-4);halt;end;
  if prime((n-2) shr 1)=true then begin writeln(3);writeln('2 ',(n-2) shr 1,' ',(n-2) shr 1);halt;end;
  for i:=n downto 3 do
    if (i and 1=1) and (prime(i)=true) then break;

  for j:=3 to n do
    if (j and 1=1) and (pri[j]=true) and (pri[n-i-j]=true) then
      begin
       writeln(3);
       writeln(i,' ',j,' ',n-i-j);
       halt;
      end;

end.