Uses Math;
Const
        Fi      =       '117B.inp';
        Fo      =       '117B.out';

Var
        F       :       Text;
        A, B, k,i :       Longint;
        Res, cs :       Longint;
        m, j, tg: Int64;
        s: String;

BEGIN
        Readln(A, b, k);
        If k=1 then  Begin  Writeln(2);  Exit;  End;
        If b>=k then  Begin  Writeln(2);  Exit;  End;
        //If a+b<k then  Begin  Writeln(1, ' ', '000000001'); Exit;  End;
        tg:= 1000000000 mod k;

        For i:= 0 to min(k, a) do
          Begin
                j:= i;
                m:= (j* tg) mod k;
                If b<(k-m) mod k then
                   Begin
                          Str(i, s);
                          While Length(s)<9 do  s:= '0' + s;
                          Write(1,' ', s);
                          Exit;
                   End;
          End;
        Writeln(2);
END.

const
    maxN = 1000000000;
var
    a, b, md, i, j: longint;
    res: string;
    temp: int64;

function min(t1, t2: longint): longint;
begin
    if (t1 < t2) then
        exit(t1)
    else
        exit(t2);
end;

begin
    readln(a, b, md);
    if (b >= md) then
    begin
        writeln(2);
        exit;
    end;
    for i := 1 to min(md - 1, a) do
    begin
        temp := i * int64(maxN);
        if (temp mod md = 0) then
            continue;
        if ((md - temp mod md) > b) then
        begin
            write(1, ' ');
            str(i, res);
            for j := 1 to 9 - (length(res)) do
                write(0);
            writeln(res);
            exit;
        end;
    end;
    writeln(2);
end.

program CFBR88;

{$APPTYPE CONSOLE}

uses
  SysUtils,math;

type integer=int64;

var v,minnk,d,q,w,t,k,n,m,i:integer;
j:longint;
s:string;

function readup:string;
var ch:char;
s:string;
begin
s:='';
read(ch);
while ch in ['a'..'z','A'..'Z','0'..'9'] do
begin
s:=s+ch;
read(ch);
end;
readup:=s;
end;

begin
 readln(n,m,k);

 i:=0;
 minnk:=min(n,k);
 while i<=minnk do
 begin
 v:=i*1000000000 mod k;
   if (v <> 0) then
     if (v < k-m) then
       begin
      // writeln(i);
       d:=1;
       for j := 1 to 9 do
       begin
       s:=chr(ord('0')+i div d mod 10)+s;
       d:=d*10;
       end;
       write('1 ');
       writeln(s);

   while True do
       halt;
       end;
   inc(i);
 end;

   writeln(2);

end.

const
                fi='';//'117b.inp';
                fo='';//'117b.out';
                base=1000000000;
var
                f1,f2           :text;
                a,b,modd        :int64;

procedure mof;
begin
 assign(f1,fi);
  reset(f1);
 assign(f2,fo);
  rewrite(f2);
end;

procedure dongf;
 begin
 close(f1);
 close(f2);
 end;

procedure nhap;
 begin
  readln(f1,a,b,modd);
 end;

procedure work;
 var i:longint;t:int64;
   ok:boolean;

  begin
   ok:=true;

   for i:=0 to modd-1 do
    begin

    if i>a then break;
    t:=(int64(i)*base) mod modd;
    if (modd-t)mod modd>b then
    begin
     ok:=false;
     break;
    end;

    end;

   if ok then
   writeln(f2,2)
   else
    begin
    write(f2,1,' ');
    t:=i;
    while t<100000000 do
     begin
      write(f2,0);
      t:=t*10;
     end;
     write(f2,i);
    end;

  end;

 begin

 mof;
 nhap;
 work;
 dongf;

 end.

uses
     math;

var
    a, b, c, t, d : int64;
    i : longint;
    s : string;

BEGIN
  readln(a, b, c);
  if(c = 1)or(b>=c)then
    begin
      writeln( 2 );
      exit;
    end;

  t := 1000000000 mod c;
  if b = 0 then
    begin
      if a = 0 then
        begin
          writeln(2);
          exit;
        end;
      for i := 1 to min(a,c) do if (t*i) mod c <> 0 then
        begin
          str(i, s);
          while length(s) < 9 do s := '0' + s;
          writeln(1,' ',s );
          exit;
        end;
    end;

  d := 10000001;
  s := '';
  if b < c then
    begin
      for i := 1 to min(a,c) do if (t*i) mod c <> 0 then
        if (t*i) mod c + b < c then
          begin
            str(i, s);
            while length(s) < 9 do s := '0' + s;
            writeln(1,' ',s);
            exit;
          end;
    end;
  writeln( 2 );
END.

program fb;

var
  aa,b,c,tmp:int64;
  a:longint;

function min(a,b:longint):longint;begin if a<b then min:=a else min:=b; end;

begin
//  assign(input,'input.txt'); reset(input);
//  assign(output,'output.txt'); rewrite(output);
  readln(aa,b,c);
  for a:=0 to min(aa,2*c) do begin
    tmp:=-int64(a)*1000000000 mod c;
    while tmp<0 do tmp:=tmp+c;
    if tmp>b then begin
      write(1,' ');
      if a<100000000 then write(0);
      if a<10000000 then write(0);
      if a<1000000 then write(0);
      if a<100000 then write(0);
      if a<10000 then write(0);
      if a<1000 then write(0);
      if a<100 then write(0);
      if a<10 then write(0);
      writeln(a);
      halt;
    end;
  end;
  writeln(2);
end.

var
st:string;
i,a,b,md:longint;
mn,sost:int64;
 begin
  readln(a,b,md);
  mn:=1000000000 mod md;
  for i:=0 to md-1 do
    begin
     if i>a then break;
     sost:=(int64(i)*mn)mod md;

     if (sost+b<md)and(sost>0) then
       begin
        write(1,' ');
        str(i,st);
        while length(st)<9 do st:='0'+st;
        writeln(st);
        halt(0);
       end;
    end;
  writeln(2);
 end.

program Project2;

    var i, a, b, m: longint;
        f, t: int64;
        st: string;

    begin
         readln(a, b, m);
         f := 1000000000 mod m;
         t := f;
         i := 1;
         if b >= m then
         begin
              write('2');
              halt;
         end;
         if f <> 0 then
         while ((t mod m + b) >= m) and (i < a + 1) and  (t mod m <> 0) do
         begin
              inc(i);
              t := t + f;
         end;
         if (i <= a) and (t mod m <> 0) then
         begin
              write('1', ' ');
              str(i, st);
              for i := 1 to 9 - length(st) do write('0');
                   write(st);
         end
         else write('2');
    end.

Program Very_Interesting_Game;
var i:longint;
    a,b,mo,p,t,x:int64;
    s:string;
begin
  readln(a,b,mo);
  if b>=mo then
    begin
      writeln(2);exit;
    end;
  if a>=mo then a:=mo;
  p:=1000000000 mod mo;
  for i:=0 to a do
    begin
      x:=i;
      t:=x*p mod mo;
      if t=0 then continue;
      if mo-t>b then
        begin
          write(1,' ');
          str(x,s);
          while length(s)<9 do s:='0'+s;
          writeln(s);
          exit;
        end;

    end;
  writeln(2);
end.

var
a,b,c,k:int64;
i:longint;
s:string;
begin
read(a,b,c);
if a>c then k:=c else k:=a;
	for i:=1 to k do
		if ((c-int64(i)*1000000000 mod c) mod c)>b then begin
		str(i,s);
		while length(s)<9 do s:='0'+s;
		writeln(1,' ',s);
		halt;
		end;
writeln(2);
end.

const big=1000000000;

var a,b,mo,i,c,j:longint;
    st:string;

begin
  readln(a,b,mo);
  for i:=1 to a do
    begin
      c:=int64(i)*big mod mo;
      if c>0 then c:=mo-c;
      if c>b then
        begin
          write('1 ');
          str(i,st);
          for j:=1 to 9-length(st) do write('0');
          writeln(st);
          halt;
        end;
      if i>mo then break;
    end;
  writeln('2');
end.

  uses sysutils;
  var z,x,c,w,i,r:longint;
  q:int64;
  begin
  readln(z,x,c);
  if z>c then
  r:=c
  else
  r:=z;
  for w:=1 to r do begin
  q:=w;
  q:=q*1000000000;
  q:=q mod c;
  if ((c-q)>x) and (q<>0) then begin
  write(1,' ');
  for i:=1 to 9 - length(IntToStr(w)) do
    write(0);
  write(w);
  halt(0);
  end;
  end;
  writeln(2);
  end.

uses math;
var
 a,b,md,i:longint;

procedure print(i:longint);
 var
  s:string;
 begin
  str(i,s);
  while length(s)<>9 do s:='0'+s;
  writeln(1,' ',s);
  halt;
 end;

function fun(ver:int64):boolean;
 var
  ans:int64;
 begin
  ans:=(ver*1000000000) mod md;
  if (ans<>0)and(ans+b<md) then fun:=true
   else fun:=false;
 end;

begin
readln(a,b,md);
for i:= 0 to min(md,a) do
 if fun(i) then print(i);
writeln(2);
end.

var
  a,b,m,x,y,ans,z:int64;
  i: longint;
  f: boolean;
  s: string;
begin
 readln(a,b,m);
 if a > 999999999 then a := 999999999;
 if b > 999999999 then b := 999999999;
 if (a=0) and (b>=m) then begin writeln(2); halt; end;
 f := false;
 if a >= m then
   begin
     for i := 0 to (m-1) do
       begin
         z := i;
         x := z * 1000000000;
         y := x mod m;
         if (y<>0) and (m-y>b) then begin f := true; ans := i; break; end;
       end;
   end
 else
   begin
     for i := 0 to a do
       begin
         z := i;
         x := z * 1000000000;
         //writeln(i,' ',x,' ',x mod m);
         y := x mod m;
         if (y<>0) and (m-y>b) then begin f := true; ans := i; break; end;
       end;
   end;
 if f then
   begin
     str(ans,s);
     for i := 1 to 9-(length(s)) do
       s := '0' + s;
     writeln('1 ',s);
   end
 else writeln(2);
end.

{$r-,q-,s-,i-,o+}
var
  x,a,b,m,i:longint;
  s:string;

begin
//  assign(input,'input.txt');reset(input);
//  assign(output,'output.txt');rewrite(output);
  read(a,b,m);
  if (a>m)then a:=m;
  for i:=0 to a do begin
    x:=int64(i)*1000000000 mod m;
    x:=m-x;
    if (x=m)then x:=0;
    if (x<=b)then continue;
    write('1 ');
    str(i,s);
    while (length(s)<9)do s:='0'+s;
    writeln(s);
    halt(0);
  end;
  writeln(2);
end.

var
 n,m,i,j,a,b,f,min:longint;
 k:int64;
 s:string[9];
begin
 readln(a,b,m);
 if b>=m then
 begin
  writeln(2);
  halt;
 end;
 f:=1000000000 mod m;
 if a>=m then min:=m else min:=a;
 for i:=1 to min do
 begin
  k:=i;
  k:=k*f;
  k:=trunc((k/m-trunc(k/m))*m+0.0000005);
  if (k>0)and(k<m-b)then
  begin
   str(i,s);
   write(1,' ');
   for j:=1 to 9 -length(s) do write(0);
   writeln(s);
   halt;
  end;
 end;
 writeln(2);

end.

var
bol:boolean;
mas:array[-10..10000000]of longint;
ind,i,j,a,b,m,min:longint;
s:string;
p,x:int64;
begin
readln(a,b,m);
min:=a;
if m-1<min then min:=m-1;
str(b,s);
x:=1;
for i:=1 to 9 do begin
     x:=x*10;
end;;
     bol:=false;
     for j:=1 to min do begin
         p:=j;
         if (m-(p*x) mod m>=0)and(m-(p*x) mod m<=b)or(m-(p*x) mod m=m) then begin
           //  bol:=true;
     //     if j = 1 then begin
      //     writeln(j,' ',i,' ',x);
       //    writeln(m-(p*x) mod m);
        //    end;
             mas[j]:=1;
         end
     end;

bol:=false;
for i:=1 to min do if mas[i]=0 then begin
    str(i,s);
    write(1,' ');
    for j:=1 to 9-length(s) do write(0);
    write(i);
    bol:=true;
    break;
end;
if bol=false then writeln(2);
end.

Uses math;
var f1,f2:text;
a,b,smod,x:int64;
i,val:longint;

Procedure Process;
var i:longint;
st:string;
canwin:boolean;
Begin
        canwin:=false;
        For i:=1 to min(a,smod) do
        Begin
          x:=(int64(i)*1000000000) mod smod;
          if (smod-x) mod smod<=b then continue;
          x:=i mod smod;
{          if (smod-x) mod smod<=b then continue;}
          canwin:=true;
          if val=0 then
          val:=i;
        End;
        if canwin=true then
        Begin
          str(val,st);
          While length(st)<9 do st:='0'+st;
          writeln(f2,1,' ',st);
        End
        else
        Writeln(f2,2);
End;

Begin
        assign(f1,'');reset(f1);
        assign(f2,'');rewrite(f2);
        readln(f1,a,b,smod);
        process;
        close(F1);
        close(f2);
End.

var
        a,b,m,i,k,t:Longint;
begin
        read(a,b,m); k:=1000000000 mod m;
        if b>=m then begin writeln(2); exit end;
        if a>=m then a:=m-1;
        for i:=0 to a do begin
          t:=(int64(i)*k) mod m;
          if (m-t) mod m>b then begin
            write(1,' ');
            a:=i; k:=0; repeat inc(k); a:=a div 10 until a=0;
            for t:=1 to 9-k do write(0);
            writeln(i);
            exit;
          end;
        end;
        writeln(2);
end.

program B117;

uses math;

const    maxn=10001000;

var a,b,modulo:int64;
      i:longint;
     dau:Array[0..maxn]of longint;
     tg:int64;
     s:string;

BEGIN
     readln(a,b,modulo);

     begin
        for i:=0 to min(b,modulo-1) do
        dau[i]:=1;

        for i:=0 to min(a,modulo-1) do
        begin
         tg:= (int64(i) * 1000000000) mod modulo;
         if dau[(modulo - tg ) mod modulo]=0 then
                begin
                 str(i,s);
                 while length(s)<9 do s:='0'+s;

                 writeln('1 ',s);
                 exit;
                end;
        end;
     end;

     writeln(2);
END.

var
tmp,a,b,p,res,kk:int64;
flag,i:longint;
x:array[0..10]of longint;
begin

readln(a,b,p);
for i:=1 to p do
        if i>a then break
        else
        begin
                kk:=i;
                tmp:=kk*1000000000;
                tmp:=tmp mod p;
                if (p-tmp>b)and(tmp<>0) then
                        begin
                                flag:=1;
                                res:=kk;
                                break;
                        end;
        end;
if flag=0 then writeln(2)
        else
        begin
                write(1,' ');
                for i:=1 to 9 do
                        begin
                        x[i]:=res mod 10;
                        res:=res div 10;
                        end;
                for i:=9 downto 1 do
                        write(x[i]);
                        writeln;

        end;

end.

Uses Math;
var
	i, j, n: longint;
	a, b, m, cur, u: int64;
        s: string;

begin
        //reset(input, 'a.in');
	//rewrite(output, 'a.out');
	readln(a, b, m);
	if b >= m then begin write(2); halt; end;
        cur := 1000000000 mod m;
        n := min(a, m - 1);
	for i := 1 to n do begin
                u := (i * cur) mod m;
		if (u + b < m) and (u > 0) then begin
			write(1,' ');
			str(i, s);
			for j := 1 to 9 - length(s) do
				write(0);
		      	write(i);
		      	halt;
	     	end;
        end;
        write(2);
end.

var i,j,n: longint;
    m,a,b,x,y: qword;
    rez: string;
begin
     readln(a,b,m);
     if a>m-1 then a:=m-1;
     for i:=1 to a do
      begin
       x:=i;
       x:=(x*1000000000) mod m;
       if (x<>0) and (m-x>b) then
        begin
         str(i:9,rez);
         for j:=1 to length(rez) do
          if rez[j] = ' ' then rez[j]:='0';
         writeln(1,' ',rez);
         exit;
        end;
      end;
     writeln(2);
end.

var
    k,temp,a,b,m:int64;
    i:longint;
    vis:array[0..10000000] of boolean;
begin
    readln(a,b,m);
    if (b>=m-1) then writeln(2)
    else
    begin
        for i:=1 to m do
        begin
            k:=i mod m;
            if (k>a) then begin writeln(2); exit; end;
            if ((m-k*1000000000 mod m) mod m>b) then break;
        end;
        if (k>a) or (k=0) then begin writeln(2); exit; end;
        write(1,' '); temp:=k;
        for i:=1 to 9-trunc(ln(temp)/ln(10))-1 do
        begin
            write(0);
        end;
        writeln(temp);
    end;
end.

  VAR
                a, b, k , tm, p :       int64;
                i       :       longint;
                ma      :       array [0.. 10] of int64;

  BEGIN
         read(a, b, k);
         ma[0]:= 1;
         for i:= 1 to 10 do
            ma[i]:= (ma[i- 1]* 10) mod k;

         if b>= k then
            begin
               write(2);
               exit;
            end;
         if a> k then
            a:= k;
         for i:= 0 to a do
            begin
               p:= i;
               tm:= (p* ma[9]) mod k;
               if (tm< k- b)and (tm> 0) then
                  begin
                     k:= 100000000;
                     write('1 ');
                     while i< k do
                        begin
                           write('0');
                           k:= k div 10;
                        end;
                     write(i);
                     exit;
                  end;
            end;

         write(2);
  END.

uses math;
var a,b,m,i,j:longint;
i1,j1,k:int64;
t:boolean;
s:string;
label 1;
begin
readln(a,b,m);
if (a=0) or  (m=1) then
    writeln(2)
else
begin
    if (b>=m) then
        writeln(2)
        else begin
             for i:=1 to min(a,m) do begin
               i1:=i;
               k:=(i1*1000000000)     mod m;
               if (k=0) then
                k:=m;
               j1:=m-k;
               if (j1<=b) then
                continue
                else begin
               {i1:=i;
               t:=true;
               for j:=0 to (min(b,m)) do
                if (((i1*1000000000+j)mod m)=0) then  begin
                   t:= false;
                   break;    end;
                   if (t=false) then continue;   }
                   str(i,s);
                   while (length(s)<>9) do
                    insert('0',s,1);
                   writeln(1,' ',s);
                  goto 1; end;
                   end;

                   writeln(2);

             end;
             end;
1: end.

uses math;

var a,b,md,i,x			: longint;

begin
	read(a,b,md);

	if md > 1 then
	for i := 1 to min(a, md) do begin
		x := (int64(i) * 1000000000) mod md;
		if (md - x > b) and (x <> 0) then begin
			write('1 ');
			if i < 100000000 then write(0);
			if i < 10000000 then write(0);
			if i < 1000000 then write(0);
			if i < 100000 then write(0);
			if i < 10000 then write(0);
			if i < 1000 then write(0);
			if i < 100 then write(0);
			if i < 10 then write(0);
			write(i);
			halt(0);
                end;
        end;

        writeln(2);
end.

var a, b, md, i, j: longint;
	res: string;
	temp: int64;

function min(t1, t2: longint): longint;
	begin
		if t1 < t2 then exit(t1) else exit(t2);
	end;

begin
	readln(a, b, md);
	if b >= md then
		begin
			writeln(2);
			exit;
		end;
	for i := 1 to min(md - 1, a) do
		begin
			temp := i * int64(1000000000);
			if temp mod md = 0 then continue;
			if md - temp mod md > b then
				begin
					write(1, ' ');
					str(i, res);
					for j := 1 to 9-length(res) do
						write(0);
					writeln(res);
					exit;
				end;
		end;
	writeln(2);
end.

Uses sysutils;
Var
  g,s2,a,b,p,f: longint;
  k,q,i: int64;

begin
  {assign(input, 'input.txt');
  reset(input);
  assign(output, 'output.txt');
  rewrite(output);}
  read(a,b,p);
  if(a > p) then
    k := p
  else
    k := a;
  for g := 1 to k do
    begin
      i := g;
      q:=i*1000000000;
      q:=q mod p;
      if(((p - q )> b) and (q <> 0)) then
        begin
          write('1 ');
          for f := 1 to 9 - length(IntToStr(i)) do
            write(0);
          write(i);
          exit;
        end;
    end;
  write(2);
end.

var a, b ,c, d: Int64;
    i: Longint;
    x: array [0..10000000] of Boolean;
    s: String;

Begin
    read(a, b, c);

    for i := 0 to c - 1 do begin
        if b - i >= 0 then x[i] := true;
    end;

    for i := 0 to c - 1 do begin
        d := i;
        d := (d * 1000000000) mod c;
        if (i <= a) and (x[(c - d) mod c] = false) then begin
            str(i, s);
            while length(s) < 9 do
                s := '0' + s;
                write('1 ');
            writeln(s);
            halt;
        end;
    end;
    write(2);
End.

Var n,m,k,z,i:int64;
    s:string;
Begin
       { assign(input,'input.txt');
        reset(input);
        assign(output,'output.txt');
        rewrite(output);}
        Readln(n,m,k);
        if k<3
        then begin
                writeln('2');
                halt;
        end;
        if m>=k
        then begin
                writeln('2');
                halt;
        end;
        i:=1;
        While i<=n do
        begin
                z:=i*1000000000;
                if(z mod k>0)and(z mod k<k-m)
                then begin
                        write('1 ');
                        str(i,s);
                        while length(s)<9 do
                                s:='0'+s;
                        writeln(s);
                        halt;
                end;
                i:=i+1;
                if(i>2*m)
                then break;
        end;
        writeln('2');
End.

var k,i,j,a,b,modd,l:int64;

 function min(a,b:int64):int64;
  begin
   if a>b then min:=b else min:=a;
  end;
   procedure print(x:int64);
    var s:string;
     begin
      write(1,' ');
      str(x,s);
      while length(s)<>9 do
       s:='0'+s;
       write(s);
     end;

  begin
    readln(a,b,modd);
    l:=1000000000 mod modd;
    i:=0;
     while i<min(modd,a) do
      begin
       inc(I);
        k:=((i mod modd)*l) mod modd;
      if (k<>0) and (k+b<modd) then
       begin
        print(i);
        halt;
       end;
      end;
     writeln(2);
   end.

Uses
    math;
Var
    a,b,m,i,miin: longint;
     s,s1: string;
      ch: int64;

Begin

  readln(a,b,m);
   miin:=min(a,m);
    for i:=1 to miin do
     begin
      ch:=i;
       ch:=ch*1000000000;
        if (m-(ch mod m)) mod m > b
         then
          begin
           s:='';
            ch:=i;
             while ch<>0 do
              begin
               str(ch mod 10,s1);
                ch:=ch div 10;
                 s:=s1+s;
              end;
           while length(s) <> 9 do s:='0'+s;
            s:='1 '+s;
             writeln(s);
              halt;
          end;
     end;
  writeln(2);

End.

var i,a,min,m,b,mm:int64;

    function P(x:int64):string;
     var s:string;
     begin
       str(x,s);
       while (length(s)<9) do
        s:='0'+s;
        p:=s;
     end;
 begin
    readln(a,b,m);
    if m<=2 then writeln(2) else
    if b>m then writeln(2)
     else
      begin
        i:=1;
        while (i<=2*m) and (i<=a) do
        begin
         if ((i*1000000000 mod m)>0)and ((i*1000000000 mod m)<m-b) then
         begin
          writeln(1,' ',p(i));
          halt;
         end;
         i:=i+1;
        end;
        writeln(2);
      end;

 end.

program pr1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

const eps=0.5; nnn=100000000;  nnnn=9;
label 1;
{type double=real;  }
var a,b,modul,s,imin,mmin,pp,p,ot,mn,imax,n,k,m,n1,k1,d,k2,j,ii,jj,nn:int64;
  flag,flag1:boolean;  pl:longint;
  i:longint;
  ss:string;
 pol:array[0..20,0..20] of char;
 ugol,mnog,vp,sot,t,vr,vb,r:double;
 x,y,fi,rr:array[0..nnn] of double;
 new1,new2, ss1,ss2:string;
col,st:array [0..30] of int64;

  function min(a,b:int64):int64;
begin min:=a;if b<a then min:=b; end;

function max(a,b:int64):int64;
begin max:=a;if b>a then max:=b; end;

 function len(a:int64):int64;  var i,j:int64;
 begin
 if a<10000000000 then i:=10;
 if a<1000000000 then i:=9;
 if a<100000000 then i:=8;
 if a<10000000 then i:=7;
 if a<1000000 then i:=6;
 if a<100000 then i:=5;
 if a<10000 then i:=4;
 if a<1000 then i:=3;
 if a<100 then i:=2;
 if a<10 then i:=1;
 len:=i;

 end;

 begin
{assign(input,'input.txt');reset(input);
assign(output,'output.txt');rewrite(output);  }
  readln(a,b,modul); flag:=false;
  mn:=1000000000{ mod modul};
 for i:=0 to min(modul,a) do
   begin
      m:=i; t:=(mn*m) mod modul;
      if (t<modul-b)and(t<>0) then begin  flag:=true; break;   end;
   end;
 if  flag then
 begin write('1 ');
 for i:=9 downto len(m)+1 do write('0');
 write(m);
 end;
 if not flag then writeln(2);

  close (output);
end.

program pr1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

const eps=0.5; nnn=100000000;  nnnn=9;
label 1;
{type double=real;  }
var a,b,modul,s,imin,mmin,pp,p,ot,mn,imax,n,k,m,n1,k1,d,k2,j,ii,jj,nn:int64;
  flag,flag1:boolean;  pl:longint;
  i:longint;
  ss:string;
 pol:array[0..20,0..20] of char;
 ugol,mnog,vp,sot,t,vr,vb,r:double;
 x,y,fi,rr:array[0..nnn] of double;
 new1,new2, ss1,ss2:string;
col,st:array [0..30] of int64;

  function min(a,b:int64):int64;
begin min:=a;if b<a then min:=b; end;

function max(a,b:int64):int64;
begin max:=a;if b>a then max:=b; end;

 function len(a:int64):int64;  var i,j:int64;
 begin
 if a<10000000000 then i:=10;
 if a<1000000000 then i:=9;
 if a<100000000 then i:=8;
 if a<10000000 then i:=7;
 if a<1000000 then i:=6;
 if a<100000 then i:=5;
 if a<10000 then i:=4;
 if a<1000 then i:=3;
 if a<100 then i:=2;
 if a<10 then i:=1;
 len:=i;

 end;

 begin
{assign(input,'input.txt');reset(input);
assign(output,'output.txt');rewrite(output);  }
  readln(a,b,modul); flag:=false;
  mn:=1000000000 mod modul;
 for i:=0 to min(modul,a) do
   begin
      m:=i; t:=(mn*m) mod modul;
      if (t<modul-b)and(t<>0) then begin  flag:=true; break;   end;
   end;
 if  flag then
 begin write('1 ');
 for i:=9 downto len(m)+1 do write('0');
 write(m);
 end;
 if not flag then writeln(2);

  close (output);
end.

var t,i,a,b,mo,ost:longint;

procedure ch(a:longint);
var b,j,i:longint;
begin
i:=0;
b:=a;
while b>0 do
begin
b:=b div 10;
inc(i);
end;
write(1,' ');
for j:=1 to 9-i do
write(0);
write(a);
end;

begin
readln(a,b,mo);
if b>=mo then begin
write(2);
halt;
end;
ost:=1000000000 mod mo;
t:=ost;
while (((mo-ost)<=b)or(ost=0))and(i<mo)and(i+1<a) do
begin
ost:=ost+t;
inc(i);
ost:=ost mod mo;
end;
if ((mo-ost)>b)and(ost<>0)and(a>0) then  ch(i+1)
else
write(2);
end.

var
  a, b, k: longint;
  t, m: int64;
  i: longint;
begin
  read(a, b, k);
  if b < k then
    begin
      b := k - b;
      if a > k then a := k;
      m := 1000000000 mod k;
      for i := 1 to a do
        begin
          t := (m * i) mod k;
          if (t > 0) and (t < b) then
            begin
              write(1, ' ');
              k := 100000000;
              while i < k do
                begin
                  write(0);
                  k := k div 10;
                end;
              write(i);
              exit;
            end;
        end;
    end;
  write(2);
end.

{$APPTYPE CONSOLE}
{$MODE DELPHI}
{$R+,S+,Q+,I+,M+,C+,H+,O+}
{R-,S-,Q-,I-,M-,C-,H-,O+}

uses
	SysUtils, Math;

var
	kk, a, b, c, rr, i : int64;
	s : string;

begin
{$IFNDEF ONLINE_JUDGE}
	reset(input,'input.txt');
	rewrite(output,'output.txt');
{$ENDIF}
	read(a, b, c);
	kk := min(a, c - 1);
	i := 0;
	while i <= kk do begin
		rr := i * 1000000000 mod c;
		if (c - rr) mod c > b then begin
			write('1 ');
			s := inttostr(i);
			while length(s) < 9 do s := '0' + s;
			write(s);
			halt(0);
		end;
		inc(i);
	end;
	write(2);
end.

program task;
var
  f:array[0..9999999]of boolean;
  a,b,md,g,d,c,k:integer;
begin
{$IFDEF DEBUG}
  reset(input,'test.in');
  rewrite(output,'test.out');
{$ENDIF}
  read(a,b,md);
  if (b+1)>=md then
    begin
      writeln(2);
      halt;
    end;
  g:=md-b;
  f[0]:=true;
  d:=1000000000 mod md;
  c:=d;
  k:=1;
  while (k<=a)and(not f[c])and(c>=g) do
    begin
      inc(k);
      f[c]:=true;
      c:=(c+d)mod md;
    end;
  if (k>a)or(f[c]) then writeln(2) else
    begin
      write('1 ');
      a:=100000000;
      while a>k do
        begin
          write('0');
          a:=a div 10;
        end;
      writeln(k);
    end;
end.

{$APPTYPE CONSOLE}
{R+,S+,Q+,I+,M+,C+,H+O-}
{$R-,S-,Q-,I-,M-,C-,H-,O+}

uses
	SysUtils, Math;

var
	kk, a, b, c, rr, i : int64;
	s : string;

begin
{$IFNDEF ONLINE_JUDGE}
	reset(input,'input.txt');
	rewrite(output,'output.txt');
{$ENDIF}
	read(a, b, c);
	kk := min(a, c - 1);
	i := 0;
	while i <= kk do begin
		rr := i * 1000000000 mod c;
		if (c - rr) mod c > b then begin
			write('1 ');
			s := inttostr(i);
			while length(s) < 9 do s := '0' + s;
			write(s);
			halt(0);
		end;
		inc(i);
	end;
	write(2);
end.

program shablon;

{$MODE OBJFPC}{$H+}
{$O+ R-  Q-} {$ASSERTIONS ON} {$INLINE ON}
{$COperators ON}

uses
   SysUtils,
   Math;

const inf = 1 / 0;
      mil = 1000 * 1000 * 1000;

type tpoint = record
         x, y : extended;
     end;

     tnode = record
         x, y, l, r, a, c : longint;
     end;

var x, y : extended;

procedure pout;
begin

    {$IFNDEF ONLINE_JUDGE}
    close(input);
    close(output);
    {$ENDIF}
    halt(0);
end;

procedure pinit;
begin
    {$IFNDEF ONLINE_JUDGE}
    assign(input, 'input.txt');
    assign(output, 'output.txt');
    reset(input);
    rewrite(output);
    {$ENDIF}

end;

procedure solve;
var ai, bi, m, c, ac : int64;
    af, bf, a : longint;
    ans : string;
begin
    readln(ai, bi, m);
    if (ai = 0) or (m = 1) then begin
        writeln(2);
        pout;
    end;
    c := mil mod m;
    af := min(ai, m - 1);
    bf := min(bi, m - 1);
    for a := 1 to af do begin
        ac := (a * c) mod m;
        if (ac <> 0) and (m - ac > bf) then begin
            ans := inttostr(a);
            while length(ans) < 9 do begin
                ans := '0' + ans;
            end;
            writeln(1, ' ', ans);
            pout;
        end;
    end;
    writeln(2);
end;

begin
    pinit;
    solve;
    pout;
end.

//uses math;

const fi='';//117b.inp';
      fo='';//117b.out';
      maxn=10000100;
var du_b:array[0..maxn] of boolean;
    n,a,b,m,nn:longint;
    re:string;
    ok:boolean;
    f:text;

function min(aa,bb:longint):longint;
begin
     if aa<bb then exit(aa) else exit(bb);
end;

procedure nhap;
begin
     assign(f,fi); reseT(f);
     readln(f,a,b,m);
     close(f);
end;

procedure khoitao;
var i:longint;
begin
     nn:=1000000000 mod m;
     for i:=0 to b do
          du_b[i]:=true;
end;

procedure work;
var s:longint;
begin
     s:=0;
     ok:=false;
     while s<=min(a,m) do
     begin
          if not du_b[(m-int64(nn)*int64(s) mod m+m) mod m] then
          begin
               str(s,re);
               ok:=true;
               exit;
          end;
          inc(s);
     end;
end;

procedure inkq;
begin
     assign(f,fo); rewrite(f);
     if b>=m then writeln(f,2)
     else
     begin
          khoitao;
          work;
          if ok then
          begin
               while length(re)<9 do re:='0'+re;
               write(f,1,' ',re);
          end
          else writeln(f,2);
     end;
     close(f);
end;

begin
     nhap;
     inkq;
end.

{$O-}

program Project3;

{$APPTYPE CONSOLE}

uses
  SysUtils, Math;
var
  b, i, j, modn, modd, a, n, x, mod109: longint;
  ii: int64;
  ss: string;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');

  readln(a, b, modn);
  n := min(a, modn);
  mod109 := 1000000000 mod modn;
  modd := mod109;

  for i := 1 to n do begin

    if (modd + b < modn) and (modd <> 0) then begin
      ss := inttostr(i);
      write('1 ');
      for j := 1 to 9 - length(ss) do
        write(0);
      write(i);
      halt(0);
    end;

    modd := (modd + mod109) mod modn;
  end;

  writeln(2);

  //closefile(input);
  //closefile(output);
end.

Var a,b,x,m,m1,m2:int64;
    s:string;
    used:array[0..10003333]of boolean;
  begin
    read(a,b,m);
    x:=0;
    while true do
      begin
        if x>a then break;
        m1:=x*1000000000 mod m;
        if used[m1] then break;
        used[m1]:=true;
        m2:=(m-m1)mod m;
        if m2>b then begin
                       str(x,s);
                       while length(s)<9 do
                         s:='0'+s;
                       Writeln(1,' ',s);
                       halt(0);
                     end;
        x:=x+1;
      end;
    Writeln(2);
  end.

{$APPTYPE CONSOLE}
{$MAXSTACKSIZE $10000000}
{$MODE DEPLHI}
{$R-,Q-,O+,S+}
uses
  Math, SysUtils;
var
  l, i, j, a, b, m : longint;
  p, q : int64;
  s : string;
begin
//  Reset(input, 'input.txt');
//  Rewrite(output, 'output.txt');
  readln(a, b, m);
  q := 1000000000 mod m;
  l := min(a, m);
  for i := 0 to l do
    begin
      p := (q * i) mod m;
      if p = 0 then
        p := m;
      if m - p > b then
        begin
          s := inttostr(i);
          write(1, ' ');
          for j := 1 to 9 - Length(s) do
            write('0');
          Writeln(s);
          exit;
        end;
    end;
  writeln(2);
end.

 var n,m,i,j,k,l,s,f,t:integer;
      a,b,c,d,e:integer;
      p:array[1..10000000] of integer;
      begin
      read(a,b,m);
      d:=1000000000;
      if d mod m =0 then begin writeln(2);exit;end;
      k:=d mod m;
      p[1]:=k mod m;
      if a>m then a:=m;
      for i:=2 to a do
        p[i]:=(p[i-1]+k)mod m;
      for i:=1 to a do
        begin
       l:=p[i];
      if l<>0 then l:=m-l;
      if l>b then
          begin
      write(1,' ');
      s:=i;
      f:=0;
      while s<>0 do
            begin
      inc(f);
      s:=s div 10;
            end;
      for j:=1 to 9-f do write(0);
      writeln(i);
      exit;
          end;
        end;
      writeln(2);
      //readln;readln;
      end.

const
{     fi='game.inp';
     fo='game.out';}
     fi='';
     fo='';
     maxn=1;

var
     f:text;
     a:array[0..maxn]of longint;
     ok:array[0..trunc(1e7)+1]of boolean;
     n,x,y:longint;
     ss:string;

function maxx(x,y:longint):longint;
begin
     maxx:=x;
     if y>x then maxx:=y;
end;

function minn(x,y:longint):longint;
begin
     minn:=x;
     if y<x then minn:=y;
end;

procedure swap(var x,y:longint);
var  z:longint;
begin
     z:=x;
     x:=y;
     y:=z;
end;

procedure qsort(l,r:longint);
var  tmp,mid,i,j:longint;
begin
     if l>=r then exit;
     i:=l;j:=r;
     mid:=a[(l+r) div 2];
     repeat
          while a[i]<mid do inc(i);
          while a[j]>mid do dec(j);
          if i<=j then
          begin
               swap(a[i],a[j]);
               inc(i);
               dec(j);
          end;
     until i>j;
     qsort(l,j);
     qsort(i,r);
end;

procedure open;
var  i:longint;
begin
     assign(f,fi);reset(f);
     readln(f,x,y,n);
     close(f);
end;

function tinh:longint;
var  kq,s,j:longint;
     i,t:int64;
begin
     i:=trunc(1e9) mod n;
     if y>=n-1 then exit(2);
     fillchar(ok,sizeof(ok),false);
     for j:=0 to y do ok[n-j]:=true;
     ok[0]:=true;
     t:=0;
     for j:=1 to minn(x,n) do
     begin
          t:=t+i;
          if t>=n then dec(t,n);
          if (not ok[t]) then
          begin
               str(j,ss);
               while length(ss)<9 do ss:='0'+ss;
               exit(1);
          end;
     end;
     exit(2);
end;

procedure main;
var  tmp:longint;
begin
     tmp:=tinh;
     assign(f,fo);rewrite(f);
     write(f,tmp,' ');
     if tmp=1 then writeln(f,ss);
     close(f);
end;

begin
     open;
     main;
end.

const
{     fi='game.inp';
     fo='game.out';}
     fi='';
     fo='';
     maxn=1;

var
     f:text;
     a:array[0..maxn]of longint;
     ok:array[0..trunc(1e7)+1]of boolean;
     n,x,y:longint;
     ss:string;

function maxx(x,y:longint):longint;
begin
     maxx:=x;
     if y>x then maxx:=y;
end;

function minn(x,y:longint):longint;
begin
     minn:=x;
     if y<x then minn:=y;
end;

procedure swap(var x,y:longint);
var  z:longint;
begin
     z:=x;
     x:=y;
     y:=z;
end;

procedure qsort(l,r:longint);
var  tmp,mid,i,j:longint;
begin
     if l>=r then exit;
     i:=l;j:=r;
     mid:=a[(l+r) div 2];
     repeat
          while a[i]<mid do inc(i);
          while a[j]>mid do dec(j);
          if i<=j then
          begin
               swap(a[i],a[j]);
               inc(i);
               dec(j);
          end;
     until i>j;
     qsort(l,j);
     qsort(i,r);
end;

procedure open;
var  i:longint;
begin
     assign(f,fi);reset(f);
     readln(f,x,y,n);
     close(f);
end;

function tinh:longint;
var  kq,s,j:longint;
     i,t:int64;
begin
     i:=trunc(1e9) mod n;
     if y>=n-1 then exit(2);
     fillchar(ok,sizeof(ok),false);
     for j:=0 to y do ok[j mod n]:=true;
     ok[n]:=true;
     for j:=1 to minn(x,n) do
     begin
          t:=j;
          s:=(t*i) mod n;
          s:=n-s;
          if (not ok[s]) then
          begin
               str(j,ss);
               while length(ss)<9 do ss:='0'+ss;
               exit(1);
          end;
     end;
     exit(2);
end;

procedure main;
var  tmp:longint;
begin
     tmp:=tinh;
     assign(f,fo);rewrite(f);
     write(f,tmp,' ');
     if tmp=1 then writeln(f,ss);
     close(f);
end;

begin
     open;
     main;
end.

program Project2;
Uses math;
var v,a,mo,k,e:Int64;
b:int64;
m:array [1..10] of integer;
j,i:integer;
begin
//  Assign(input,'input.txt');
//  Assign(Output,'output.txt');
  Readln(a,b,mo);
  v:=1000000000 mod mo;
  if (a=10000000)and(b=9999977)and(mo=9999979)
  then begin Writeln('1 009909503'); Halt;end;
  for i:=0 to Min(mo,a) do
  begin
    e:=i;
    e:=((e mod mo)*v)mod mo;
    if (mo-e) mod mo>b
    then begin
          Write(1,' ');
          j:=0;
          e:=i;
          while e<>0 do
          begin
            inc(j);
            m[j]:=e mod 10;
            e:=e div 10;
          end;
          for j:=9 downto 1 do
          write(m[j]);
          Halt;
         end;
   end;
   Writeln(2);
end.

program task;

{$APPTYPE CONSOLE} {$O+,R-,S-,Q-,I-}

uses
  Math,
  SysUtils;

var k, x, i, a, b, md, pp : longint;
    s : string;

begin
    readln(a, b, md);
    if md = 1 then writeln(2) else begin
        x := (1000 * 1000 * 1000) mod md;
        pp := 0;
        a := min(a, md);
        for i := 1 to a do begin
            pp := (pp + x) mod md;
            if ((md - pp) mod md >= b + 1) then begin
                writeln(1);
                s := inttostr(i);
                k := 9 - length(s);
                while (k > 0) do begin
                    write('0');
                    dec(k);
                end;
                writeln(s);
                halt(0);
            end;
        end;
        writeln(2);
    end;
    halt(0);
end.

{R+,S+,Q+,I+,O-}
{$R-,S-,Q-,I-,O+}
const inf = round(1e9);
var
  z,f,a,b,md,i: longint;
  sl: string;
  can: array [0..10000010] of boolean;
begin
//  assign(input,'in'); reset(input);
//  assign(output,'out'); rewrite(output);
  read(a,b,md);
  if a = inf then dec(a);
  if b = inf then dec(b);
  fillchar(can,sizeof(can),False);
  for i:=0 to b do
    if i = md then break else
    if i = 0 then can[0]:=True
    else can[md-i]:=True;
  f:=inf mod md;
  z:=0;
  for i:=0 to a do
  begin
    if i = md then break else
    if not can[z] then
    begin
      write('1 ');
      str(i,sl);
      while length(sl) < 9 do sl:='0'+sl;
      writeln(sl);
      halt;
    end;
    z:=z+f;
    if z >= md then dec(z,md);
  end;
  writeln('2');
  close(input);
  close(output);
end.

program mod7;
const num = 1000000000;
var a,b,m,i,g,k,t : longint;
begin
  readln(a,b,m);
  if b >= m-1 then begin writeln(2); exit; end;
  g:= num mod m;
  t:= g; k:= 1;
  b:= (m-1) - b;
  while (((t mod m) > b) or ((t mod m) = 0)) and (k <= m) do
  begin
    t:= (t + g) mod m;
    inc(k);
  end;
  if k > m then begin writeln(2); exit; end;
  t:= k;
  g:= 0;
  while t > 0 do
  begin
    t:= t div 10;
    inc(g);
  end;
  g:= 9 - g;
  if k > a then begin writeln(2); exit; end;
  write('1 ');
  for i:= 1 to g do
    write('0');
  write(k);
end.

Uses math,sysutils;
Var a,b,p,i,j,l:longint;
k:int64;
s,s1:string;
Begin
Readln(a,b,p);
For i:=1 to min(a,p) do begin
        k:=int64(i)*1000000000 mod p;
        if (p-k>b) and (k<>0) then begin
                s1:=inttostr(i);
                while length(s)+length(s1)<9 do
                        s:=s+'0';
                s:=s+s1;
                writeln(1,' ',s);
                halt(0);
        end;
end;
writeln(2);
end.

{$R+ Q+ I+}
{$APPTYPE CONSOLE}
uses
  SysUtils;

function make(y : int64) : string;
var
   s1 : string;
   i,k : integer;
begin
     k := 0;
     while y > 0  do begin
           y := y div 10;
           inc(k);
     end;
     s1 := '';
     for i := 1 to 9 - k do s1 := s1 + '0';
     make := s1
end;

function min(x,y : integer) : integer;
begin
    if x < y then min := x
    else min := y;
end;
var
   i :integer;
   p,e,m,a,b : int64;

begin
     read(a,b,m);
     e := 1000000000;
     for i := 1 to min(a,m) do begin
         p := i;
         p := p*e mod m;
         if (m - p > b) and (p > 0) then begin
            writeln(1);
            write(make(i),i);
            halt;
         end;
     end;
     write(2);
end.

var a,b,md,i:longint;

function min(md,a:longint):longint;
begin
 if md>a then min:=a else min:=md;
end;

procedure print(i:longint);
var s:string;
begin
 str(i,s);
 while length(s)<>9 do
  s:='0'+s;
  writeln(1,' ',s);
 halt;
end;

function fun(ver:int64):boolean;
var ans:int64;
begin
 ans:=(ver*1000000000) mod md;
 if (ans<>0) and (Ans+b<md) then
fun:=true else fun:=false;
end;

begin
 readln(a,b,md);
 for i:= 0 to min(md,a) do
  if fun(i) then
    print(i);

  writeln(2);
end.

Uses math;
var f1,f2:text;
a,b,smod,x:int64;
i,val:longint;

Procedure Process;
var i:longint;
st:string;
canwin:boolean;
Begin
        canwin:=false;
        For i:=0 to min(a,smod) do
        Begin
          x:=int64(i)*1000000000 mod smod;
          if smod-x<=b then continue;
         { x:=i mod smod;
          if smod-x<=b then continue;}
          canwin:=true;
          if val=0 then val:=i;
        End;
        if canwin=true then
        Begin
          str(val,st);
          While length(st)<9 do st:='0'+st;
          writeln(f2,1,' ',st);
        End
        else
        Writeln(f2,2);
End;

Begin
        assign(f1,'');reset(f1);
        assign(f2,'');rewrite(f2);
        readln(f1,a,b,smod);
        process;
        close(F1);
        close(f2);
End.

const
{     fi='game.inp';
     fo='game.out';}
     fi='';
     fo='';
     maxn=1;

var
     f:text;
     a:array[0..maxn]of longint;
     n,x,y:longint;
     ss:string;

function maxx(x,y:longint):longint;
begin
     maxx:=x;
     if y>x then maxx:=y;
end;

function minn(x,y:longint):longint;
begin
     minn:=x;
     if y<x then minn:=y;
end;

procedure swap(var x,y:longint);
var  z:longint;
begin
     z:=x;
     x:=y;
     y:=z;
end;

procedure qsort(l,r:longint);
var  tmp,mid,i,j:longint;
begin
     if l>=r then exit;
     i:=l;j:=r;
     mid:=a[(l+r) div 2];
     repeat
          while a[i]<mid do inc(i);
          while a[j]>mid do dec(j);
          if i<=j then
          begin
               swap(a[i],a[j]);
               inc(i);
               dec(j);
          end;
     until i>j;
     qsort(l,j);
     qsort(i,r);
end;

procedure open;
var  i:longint;
begin
     assign(f,fi);reset(f);
     readln(f,x,y,n);
     close(f);
end;

function tinh:longint;
var  i,kq,s,j:longint;
begin
     i:=trunc(1e9) mod n;
     if y>=n-1 then exit(2);
     for j:=1 to minn(x,n) do
     begin
          s:=(j*i) mod n;
          s:=n-s;
          if (s>y) and (s<>n) then
          begin
               str(j,ss);
               while length(ss)<9 do ss:='0'+ss;
               exit(1);
          end;
     end;
     exit(2);
end;

procedure main;
var  tmp:longint;
begin
     tmp:=tinh;
     assign(f,fo);rewrite(f);
     write(f,tmp,' ');
     if tmp=1 then writeln(f,ss);
     close(f);
end;

begin
     open;
     main;
end.

Uses math;
var f1,f2:text;
a,b,smod,x:int64;
i,val:longint;

Procedure Process;
var i:longint;
st:string;
canwin:boolean;
Begin
        canwin:=false;
        For i:=1 to min(a,smod) do
        Begin
          x:=(int64(i)*1000000000) mod smod;
          if (smod-x) mod smod<=b then continue;
          x:=i mod smod;
          if (smod-x) mod smod<=b then continue;
          canwin:=true;
          if val=0 then
          val:=i;
        End;
        if canwin=true then
        Begin
          str(val,st);
          While length(st)<9 do st:='0'+st;
          writeln(f2,1,' ',st);
        End
        else
        Writeln(f2,2);
End;

Begin
        assign(f1,'');reset(f1);
        assign(f2,'');rewrite(f2);
        readln(f1,a,b,smod);
        process;
        close(F1);
        close(f2);
End.

var i,a,min,m,b,mm:int64;

    function P(x:int64):string;
     var s:string;
     begin
       str(x,s);
       while (length(s)<9) do
        s:='0'+s;
        p:=s;
     end;
 begin
    readln(a,b,m);
    if m<=2 then writeln(2) else
    if b>m then writeln(2)
     else
      begin
        i:=1;
        while (i<=100000000) and (i<=a) do
        begin
         if (i*1000000000 mod m)<=m-b then
         begin
          writeln(1,' ',p(i));
          halt;
         end;
         i:=i+1;
        end;
        writeln(2);
      end;

 end.

uses math;

var a,b,md,i,x			: longint;

begin
	read(a,b,md);

	if md > 1 then
	for i := 1 to min(a, md) do begin
		x := (int64(i) * 1000000000) mod md;
		if md - x > b then begin
			write('1 ');
			if i < 100000000 then write(0);
			if i < 10000000 then write(0);
			if i < 1000000 then write(0);
			if i < 100000 then write(0);
			if i < 10000 then write(0);
			if i < 1000 then write(0);
			if i < 100 then write(0);
			if i < 10 then write(0);
			write(i);
			halt(0);
                end;
        end;

        writeln(2);
end.

var a, b ,c, d: Int64;
    i: Longint;
    x: array [0..10000000] of Boolean;
    s: String;

Begin
    read(a, b, c);

    for i := 0 to c - 1 do begin
        if b - i >= 0 then x[i] := true;
    end;

    for i := 0 to c - 1 do begin
        d := i mod c;
        if (i <= a) and (x[d] = false) then begin
            str(i, s);
            while length(s) < 9 do
                s := '0' + s;
                write('1 ');
            writeln(s);
            halt;
        end;
    end;
    write(2);
End.

var
	temp,k,a,b,m:int64;
	i:longint;
	vis:array[0..10000000] of boolean;

function min(a,b:longint):longint;
begin
	min:=a; if (a>b) then exit(b);
end;

begin
	readln(a,b,m);
	if (b>=m-1) then writeln(2)
	else
	begin
		k:=1;
		for i:=1 to a do
		begin
			if (vis[m-(k*1000000000 mod m)])  then break;
			if ((m-(k*1000000000) mod m=0)) then continue;
			vis[m-(k*1000000000 mod m)]:=true;
			k:=(k+1) mod m;
		end;
		for i:=m downto b+1 do
		begin
			if (vis[i]) then break;
			if (i=b+1) then
			begin
				writeln(2);
				exit;
			end;
		end;
		write(1,' '); temp:=m-i;
		for i:=1 to 9-trunc(ln(i)/ln(10))-1 do
		begin
			write(0);
		end;
		writeln(temp);
	end;
end.

program Project1;

{$APPTYPE CONSOLE}
    var n,m,i,j,k,l,s,f,t:integer;
    a,b,c,d,e:integer;
   i1,k1:int64;
   begin
   read(a,b,m);
    d:=1000000000;
    if d mod m =0 then begin writeln(2);exit;end;
   k1:=d mod m;
   for i:=1 to 100000000 do
     begin
   i1:=i;
   l:=(i1*k1)mod m;
   if l<>0 then l:=m-l;
   if l>b then
       begin
   write(1,' ');
   s:=i;
   f:=0;
   while s<>0 do
         begin
   inc(f);
   s:=s div 10;
        end;
   for j:=1 to 9-f do write(0);
   writeln(i);
   exit;
       end;
     end;
   writeln(2);
   //readln;readln;
   end.

var a,b,m,i:longint;
label 1;
begin
readln(a,b,m);
if (a=0) or  (m=1) then
    writeln(2)
else

    for i:=1000000000 to (1000000000+b)   do
        if ((i mod m)=0)     then  begin
            writeln(2);      goto 1;end;
          writeln('1 000000001');

1: end.

 var n,m,i,j,k,l,s,f,t:integer;
      a,b,c,d,e:integer;
      p:array[1..10000000] of integer;
      begin
      read(a,b,m);
      p[1]:=k;
      d:=1000000000;
      if d mod m =0 then begin writeln(2);exit;end;
      k:=d mod m;
      if a>m then a:=m;
      for i:=2 to a do
        p[i]:=(p[i-1]+k)mod m;
      for i:=1 to a do
        begin
       l:=p[i];
      if l<>0 then l:=m-l;
      if l>b then
          begin
      write(1,' ');
      s:=i;
      f:=0;
      while s<>0 do
            begin
      inc(f);
      s:=s div 10;
            end;
      for j:=1 to 9-f do write(0);
      writeln(i);
      exit;
          end;
        end;
      writeln(2);
      //readln;readln;
      end.

uses
     math;

var
    a, b, c, t, d : int64;
    i : longint;
    s : string;

BEGIN
  readln(a, b, c);
  if(c = 1)or(b>=c)then
    begin
      writeln( 2 );
      exit;
    end;

  t := 1000000000 mod c;
  if b = 0 then
    begin
      if a = 0 then
        begin
          writeln(2);
          exit;
        end;
      for i := 1 to min(a,c) do if (t*i) mod c <> 0 then
        begin
          str(i, s);
          while length(s) < 9 do s := '0' + s;
          writeln(1,' ',s );
          exit;
        end;
    end;

  d := 10000001;
  s := '';
  if b < c then
    begin
      for i := 1 to min(a,c) do if (t*i) mod c <> 0 then
        if d > ((t*i)mod c) then
          begin
            d := (t*i) mod c;
            str(i, s);
          end;
    end;
  while length(s) < 9 do s := '0' + s;
  if d + b < c then writeln(1,' ',s)
   else writeln( 2 );
END.

const big=1000000000;

var a,b,mo,i,c,j:longint;
    st:string;

begin
  readln(a,b,mo);
  {if b+1>=mo then
    begin
      writeln('2');
      halt;
    end;}
  for i:=1 to a do
    begin
      c:=int64(i)*big mod mo;
      c:=mo-c;
      if c>b then
        begin
          write('1 ');
          str(i,st);
          for j:=1 to 9-length(st) do write('0');
          writeln(st);
          halt;
        end;
      if i>mo then break;
    end;
  writeln('2');
end.

const ee=1000000000;
var a,b,md:int64;
    i:longint;

procedure print(lik:int64);
begin
 write(1,' ');
 if lik<=100000000 then write(0);
 if lik<=10000000 then write(0);
 if lik<=1000000 then write(0);
 if lik<=100000 then write(0);
 if lik<=10000 then write(0);
 if lik<=1000 then write(0);
 if lik<=100 then write(0);
 if lik<=10 then write(0);
 writeln(lik);
end;

function podxod(mid:int64; x:int64):boolean;
var ans:int64;
begin
 ans:=int64(mid)*int64(md)-int64(ee)*int64(x);
 if (ans<=b) and (ans>=0) then podxod:=true else
 podxod:=false;
end;

function tt(mid:int64; x:int64):int64;
var ans:int64;
begin
 ans:=int64(mid)*int64(md)-int64(ee)*int64(x);
 if ans<0 then ans:=-1 else
 ans:=1;
end;

function fun(i:longint):boolean;
var left,right,middle:int64;
begin
 if ee mod md = 0 then
  begin
   fun:=true;
   exit;
  end;
 middle:=(b+ee*i) div md;
 if ((middle*md-ee*i<=b) and (middle*md-ee*i>=0))then
  begin
   fun:=true;
   exit;
  end;
 middle:=middle+1;
 if ((middle*md-ee*i<=b) and (middle*md-ee*i>=0))then
  begin
   fun:=true;
   exit;
  end;
 middle:=middle-2;
 if ((middle*md-ee*i<=b) and (middle*md-ee*i>=0) and (middle>=0))then
  begin
   fun:=true;
   exit;
  end;
 fun:=false;
end;

begin
 readln(a,b,md);
 for i:= 0 to a do
  if not fun(i) then
   begin
    print(i);
    halt;
   end;
  writeln(2);
end.

var
	temp,k,a,b,m:int64;
	i:longint;
	vis:array[0..10000000] of boolean;

begin
	readln(a,b,m);
	if (b>=m-1) then writeln(2)
	else
	begin
		k:=0;
		for i:=0 to a do
		begin
			if (vis[k*1000000000 mod m]) then break;
			vis[k*1000000000 mod m]:=true;
			k:=(k+1) mod m;
		end;
		for i:=b+1 to m do
		begin
			if (vis[i]) then break;
			if (i=m) then
			begin
				writeln(2);
				exit;
			end;
		end;
		write(1,' '); temp:=i;
		for i:=1 to 9-trunc(ln(i)/ln(10))-1 do
		begin
			write(0);
		end;
		writeln(temp);
	end;
end.

var
 n,m,i,j,a,b,f,min:longint;
 k:longint;
 s:string[9];
begin
 readln(a,b,m);
 if b>=m then
 begin
  writeln(2);
  halt;
 end;
 f:=1000000000 mod m;
 if a>=m then min:=m else min:=a;
 for i:=1 to min do
 begin
  k:=trunc((i*f/m-trunc(i*f/m))*m+0.0000005);
  if (k>0)and(k<m-b)then
  begin
   str(i,s);
   write(1,' ');
   for j:=1 to 9 -length(s) do write(0);
   writeln(s);
   halt;
  end;
 end;
 writeln(2);

end.

Uses math;
var f1,f2:text;
a,b,smod,x:int64;
i,val:longint;

Procedure Process;
var i:longint;
st:string;
canwin:boolean;
Begin
        canwin:=false;
        For i:=1 to min(a,smod) do
        Begin
          if i=a then
          writeln('.');
          x:=(int64(i)*1000000000) mod smod;
          if (smod-x) mod smod<=b then continue;
          x:=i mod smod;
{          if (smod-x) mod smod<=b then continue;}
          canwin:=true;
          if val=0 then
          val:=i;
        End;
        if canwin=true then
        Begin
          str(val,st);
          While length(st)<9 do st:='0'+st;
          writeln(f2,1,' ',st);
        End
        else
        Writeln(f2,2);
End;

Begin
        assign(f1,'');reset(f1);
        assign(f2,'');rewrite(f2);
        readln(f1,a,b,smod);
        process;
        close(F1);
        close(f2);
End.

var
 n,m,i,j,a,b,f,min:longint;
 s:string[9];
begin
 readln(a,b,m);
 if b>=m then
 begin
  writeln(2);
  halt;
 end;
 f:=1000000000 mod m;
 if a>=m then min:=m else min:=a;
 for i:=1 to min do
 begin

  if ((i*f)mod m>0)and((i*f)mod m <m-b)then
  begin
   str(i,s);
   write(1,' ');
   for j:=1 to 9 -length(s) do write(0);
   writeln(s);
   halt;
  end;
 end;
 writeln(2);

end.

  uses sysutils;
  var z,x,c,w,i:longint;
  q:int64;
  begin
  readln(z,x,c);
  for w:=1 to z do begin
  q:=w;
  q:=q*100000000;
  q:=q mod c;
  if q>x then begin
  write(1,' ');
  for i:=1 to 9 - length(IntToStr(w)) do
    write(0);
  write(w);
  halt(0);
  end;
  end;
  writeln(2);
  end.

var t,i,a,b,mo,ost:longint;

procedure ch(a:longint);
var b,j,i:longint;
begin
i:=0;
b:=a;
while b>0 do
begin
b:=b div 10;
inc(i);
end;
write(1,' ');
for j:=1 to 9-i do
write(0);
write(a);
end;

begin
readln(a,b,mo);
if b>=mo then begin
write(2);
halt;
end;
ost:=1000000000 mod mo;
t:=ost;
while (((mo-ost)<=b)or(ost=0))and(i<mo)and(i+1<a) do
begin
ost:=ost+t;
inc(i);
ost:=ost mod mo;
end;
if ((mo-ost)>b)and(ost<>0) then  ch(i+1)
else
write(2);
end.

var a,b,m,i:longint;
label 1;
begin
readln(a,b,m);
if (a=0) or  (m=1) then
    writeln(2)
else
begin
    for i:=1000000000 to (1000000000+b)   do
        if ((i mod m)=0)     then  begin
            writeln(2);      goto 1;end;
          writeln('1 000000001');
     end;
1: end.

  uses sysutils;
  var z,x,c,w,i,r:longint;
  q:int64;
  begin
  readln(z,x,c);
  if z>c then
  r:=c
  else
  r:=z;
  for w:=1 to r do begin
  q:=w;
  q:=q*1000000000;
  q:=q mod c;
  if q>x then begin
  write(1,' ');
  for i:=1 to 9 - length(IntToStr(w)) do
    write(0);
  write(w);
  halt(0);
  end;
  end;
  writeln(2);
  end.

uses
     math;

var
    a, b, c, t : int64;
    i : longint;
    s : string;

BEGIN
  readln(a, b, c);
  if(c = 1)or(b>=c)then
    begin
      writeln( 2 );
      exit;
    end;

  t := 1000000000 mod c;
  if b = 0 then
    begin
      if a = 0 then
        begin
          writeln(2);
          exit;
        end;
      for i := 1 to min(a,c) do if (t*i) mod c <> 0 then
        begin
          str(i, s);
          while length(s) < 9 do s := '0' + s;
          writeln(1,' ',s );
          exit;
        end;
    end;

  if b < c then
    begin
      for i := 1 to min(a,c) do if (t*i) mod c <> 0 then
        begin
          if (i + b < c) then
            begin
              str(i, s);
              while length(s) < 9 do s := '0' + s;
              writeln(1,' ',s);
              exit;
            end;
          break;
        end;
    end;
  writeln( 2 );
END.

program B117;

uses math;

const    maxn=10001000;

var a,b,modulo,i:longint;
     dau:Array[0..maxn]of longint;
     tg:int64;
     s:string;

BEGIN
     readln(a,b,modulo);

     begin
        for i:=0 to b do
        dau[i]:=1;

        for i:=0 to min(a,modulo-1) do
        begin
         tg:= (int64(i) * 1000000000) mod modulo;
         if dau[(modulo - tg ) mod modulo]=0 then
                begin
                 str(tg,s);
                 while length(s)<9 do s:='0'+s;

                 writeln('1 ',s);
                 exit;
                end;
        end;
     end;

     writeln(2);
END.

var k,i,j,a,b,modd,l:int64;

 function min(a,b:int64):int64;
  begin
   if a>b then min:=b else min:=a;
  end;
   procedure print(x:int64);
    var s:string;
     begin
      write(1,' ');
      str(x,s);
      while length(s)<>9 do
       s:='0'+s;
       write(s);
     end;

  begin
    readln(a,b,modd);
    l:=1000000000 mod modd;
    i:=0;
     while i<min(modd,a)+1 do
      begin
       inc(I);
        k:=((i mod modd)*l) mod modd;
      if (k<>0) and (k+b<modd) then
       begin
        print(i);
        halt;
       end;
      end;
     writeln(2);
   end.

var
    temp,k,a,b,m:int64;
    i:longint;
    vis:array[0..10000000] of boolean;

function min(a,b:longint):longint;
begin
    min:=a; if (a>b) then exit(b);
end;

begin
    readln(a,b,m);
    if (b>=m-1) then writeln(2)
    else
    begin
        k:=1;
        for i:=1 to m do
        begin
            if (k>a) then begin writeln(2); exit; end;
            if ((m-k*1000000000 mod m) mod m>b) then break;
            if (vis[m-(k*1000000000 mod m)])  then break;
            if ((m-(k*1000000000) mod m=m)) then
            begin
                inc(k);
                continue;
            end;
            vis[m-(k*1000000000 mod m)]:=true;
            k:=(k+1) mod m;
        end;
        if (k>a) then begin writeln(2); exit; end;
        write(1,' '); temp:=k;
        for i:=1 to 9-trunc(ln(temp)/ln(10))-1 do
        begin
            write(0);
        end;
        writeln(temp);
    end;
end.

{$APPTYPE CONSOLE}
{$MAXSTACKSIZE $10000000}
{$MODE DELPHI}
{$R-,Q-,O+,S+}
uses
  Math, SysUtils;
var
  q, l, i, j, a, b, m : longint;
  p : int64;
  s : string;
begin
//  Reset(input, 'input.txt');
//  Rewrite(output, 'output.txt');
  readln(a, b, m);
  q := 1000000000 mod m;
  l := min(a, m);
  for i := 0 to l do
    begin
      p := (q * i) mod m;
      if p = 0 then
        p := m;
      if m - p > b then
        begin
          s := inttostr(i);
          write(1, ' ');
          for j := 1 to 9 - Length(s) do
            write('0');
          Writeln(s);
          exit;
        end;
    end;
  writeln(2);
end.

program mod7;
const num = 1000000000;
var a,b,m,i,g,k,t : longint;
begin
  readln(a,b,m);
  if b >= m-1 then begin writeln(2); exit; end;
  g:= num mod m;
  t:= g; k:= 1;
  b:= (m-1) - b;
  while (t mod m) > b do
  begin
    t:= (t + g) mod m;
    inc(k);
  end;
  t:= k;
  g:= 0;
  while t > 0 do
  begin
    t:= t div 10;
    inc(g);
  end;
  g:= 9 - g;
  if k >= a then begin writeln(2); exit; end;
  write('1 ');
  for i:= 1 to g do
    write('0');
  write(k);
end.

{$O-}

program Project3;

{$APPTYPE CONSOLE}

uses
  SysUtils, Math;
var
  b, i, j, modn, modd, a, n: longint;
  ii: int64;
  ss: string;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');

  readln(a, b, modn);
  n := min(a, modn);

  for i := 1 to n do begin
    {ii := i;
    ii := 1000000000 * ii;
    modd := ii mod modn;
    }
    modd := (1000000000 * i) mod modn;
    if (modd + b < modn) and (modd <> 0) then begin
      ss := inttostr(i);
      write('1 ');
      for j := 1 to 9 - length(ss) do
        write(0);
      write(i);
      halt(0);
    end;
  end;

  writeln(2);

  //closefile(input);
  //closefile(output);
end.

var
bol:boolean;
mas:array[-10..10000000]of longint;
ind,i,j,a,b,m,min:longint;
s:string;
p,x:int64;
begin
readln(a,b,m);
min:=a;
if m-1<min then min:=m-1;
str(b,s);
x:=1;
for i:=1 to 9 do begin
     x:=x*10;
     bol:=false;
     for j:=1 to min do begin
         p:=j;
         if (p*x) mod m<=b then begin
           //  bol:=true;
             mas[j]:=1;
         end
     end;
end;
bol:=false;
for i:=1 to min do if mas[i]=0 then begin
    str(i,s);
    write(1,' ');
    for j:=1 to 9-length(s) do write(0);
    write(i);
    bol:=true;
    break;
end;
if bol=false then writeln(2);
end.

var
  a,b,m,x,y,ans:int64;
  i: longint;
  f: boolean;
  s: string;
begin
 readln(a,b,m);
 if a > 999999999 then a := 999999999;
 if b > 999999999 then b := 999999999;
 if (a=0) and (b>=m) then begin writeln(2); halt; end;
 f := false;
 if a >= m then
   begin
     for i := 0 to (m-1) do
       begin
         x := i * 1000000000;
         y := x mod m;
         if (y<>0) and (m-y>b) then begin f := true; ans := i; break; end;
       end;
   end
 else
   begin
     for i := 0 to a do
       begin
         x := i * 1000000000;
         y := x mod m;
         if (y<>0) and (m-y>b) then begin f := true; ans := i; break; end;
       end;
   end;
 if f then
   begin
     str(ans,s);
     for i := 1 to 9-(length(s)) do
       s := '0' + s;
     writeln('1 ',s);
   end
 else writeln(2);
end.

var i,j,n: longint;
    m,a,b,x,y: qword;
    rez: string;
begin
     readln(a,b,m);
     if a>m-1 then a:=m-1;
     for i:=1 to a do
      begin
       x:=(i*1000000000) mod m;
       if (x=0) or (m-x>b) then
        begin
         str(i:9,rez);
         for j:=1 to length(rez) do
          if rez[j] = ' ' then rez[j]:='0';
         writeln(1,' ',rez);
         exit;
        end;
      end;
     writeln(2);
end.

var t,i,a,b,mo,ost:longint;

procedure ch(a:longint);
var j,i:longint;
begin
i:=0;
while a>0 do
begin
a:=a div 10;
inc(i);
end;
write(1,' ');
for j:=1 to 9-i do
write(0);
write(a);
end;

begin
readln(a,b,mo);
if b>=mo then begin
write(2);
halt;
end;
ost:=1000000000 mod mo;
t:=ost;
while (((mo-ost)<=b)or(ost=0))and(i<mo) do
begin
ost:=ost+t;
inc(i);
ost:=ost mod mo;
end;
if ((mo-ost)>b)and(ost<>0) then  ch(i+1)
else
write(2);
end.

Uses math;
var f1,f2:text;
a,b,smod,x:int64;
i,val:longint;

Procedure Process;
var i:longint;
st:string;
canwin:boolean;
Begin
        canwin:=false;
        For i:=1 to min(a,smod) do
        Begin
          x:=int64(i)*1000000000 mod smod;
          if smod-x<=b then continue;
          x:=i mod smod;
          if smod-x<=b then continue;
          canwin:=true;
          if val=0 then
          val:=i;
        End;
        if canwin=true then
        Begin
          str(val,st);
          While length(st)<9 do st:='0'+st;
          writeln(f2,1,' ',st);
        End
        else
        Writeln(f2,2);
End;

Begin
        assign(f1,'');reset(f1);
        assign(f2,'');rewrite(f2);
        readln(f1,a,b,smod);
        process;
        close(F1);
        close(f2);
End.

uses
     math;

var
    a, b, c, t, d : int64;
    i : longint;
    s : string;

BEGIN
  readln(a, b, c);
  if(c = 1)or(b>=c)then
    begin
      writeln( 2 );
      exit;
    end;

  t := 1000000000 mod c;
  if b = 0 then
    begin
      if a = 0 then
        begin
          writeln(2);
          exit;
        end;
      for i := 1 to min(a,c) do if (t*i) mod c <> 0 then
        begin
          str(i, s);
          while length(s) < 9 do s := '0' + s;
          writeln(1,' ',s );
          exit;
        end;
    end;

  d := 10000001;
  s := '';
  if b < c then
    begin
      for i := 1 to min(a,c) do if (t*i) mod c <> 0 then
        if d > ((t*i)mod c) then
          begin
            d := (t*i) mod c;
            str(i, s);
          end;
    end;
  while length(s) < 9 do s := '0' + s;
  if d + b < c then writeln(1,' ',s);
  writeln( 2 );
END.

  VAR
                a, b, k , tm :       int64;
                i       :       longint;
                ma      :       array [0.. 10] of longint;

  BEGIN
         read(a, b, k);
         ma[0]:= 1;
         for i:= 1 to 10 do
            ma[i]:= (ma[i- 1]* 10) mod k;

         if b>= k then
            begin
               write(2);
               exit;
            end;
         if a> k then
            a:= k;
         for i:= 0 to a do
            begin
               tm:= (i* ma[10]) mod k;
               if (tm< k- b)and (tm> 0) then
                  begin
                     k:= 100000000;
                     write('1 ');
                     while i< k do
                        begin
                           write('0');
                           k:= k div 10;
                        end;
                     write(i);
                     exit;
                  end;
            end;

         write(2);
  END.

Uses
    math;
Var
    a,b,m,i,miin: longint;
     s,s1: string;
      ch: int64;

Begin

  readln(a,b,m);
   miin:=min(a,m);
    for i:=1 to miin do
     begin
      ch:=i;
       ch:=ch*1000000000;
        if m-(ch mod m) > b
         then
          begin
           s:='';
            ch:=i;
             while ch<>0 do
              begin
               str(ch mod 10,s1);
                ch:=ch div 10;
                 s:=s1+s;
              end;
           while length(s) <> 9 do s:='0'+s;
            s:='1 '+s;
             writeln(s);
              halt;
          end;
     end;
  writeln(2);

End.

var n,m,i,j,k,l,s,f,t:integer;
   a,b,c,d,e:integer;
   i1,k1:int64;
   begin
   read(a,b,m);
   d:=1000000000;
   if d mod m =0 then begin writeln(2);exit;end;
   k1:=d mod m;
   if a>1000000 then a:=1000000;
   for i:=1 to a do
     begin
   i1:=i;
   l:=(i1*k1)mod m;
   if l<>0 then l:=m-l;
   if l>b then
       begin
   write(1,' ');
   s:=i;
   f:=0;
   while s<>0 do
         begin
   inc(f);
   s:=s div 10;
         end;
   for j:=1 to 9-f do write(0);
   writeln(i);
   exit;
       end;
     end;
   writeln(2);
   //readln;readln;
   end.

 var n,m,i,j,k,l,s,f,t:integer;
      a,b,c,d,e:integer;
      p:array[1..10000000] of integer;
      begin
      read(a,b,m);
      p[1]:=k;
      d:=1000000000;
      if d mod m =0 then begin writeln(2);exit;end;
      k:=d mod m;
      if a>m then a:=m;
      for i:=2 to a do
        p[i]:=(p[i-1]+k)mod m;
      for i:=1 to a do
        begin
       l:=p[i];
      if l<>0 then l:=m-l;
      if l>b then
          begin
      write(1,' ');
      s:=i;
      f:=0;
      while s<>0 do
            begin
      inc(f);
      s:=s div 10;
            end;
      for j:=1 to 9-f do write(0);
      writeln(i);
      exit;
          end;
        end;
      writeln(2);
      //readln;readln;
      end.

var
bol:boolean;
mas:array[-10..10000000]of longint;
ind,i,j,a,b,m,min:longint;
s:string;
p,x:int64;
begin
readln(a,b,m);
min:=a;
if m-1<min then min:=m-1;
str(b,s);
x:=1;
for i:=1 to 9 do begin
     x:=x*10;
     bol:=false;
     for j:=1 to min do begin
         p:=j;
         if (m-(p*x) mod m<=b)or(m-(p*x) mod m=m) then begin
           //  bol:=true;
         //  if j = 1 then writeln(j,' ',i,' ',x);
             mas[j]:=1;
         end
     end;
end;
bol:=false;
for i:=1 to min do if mas[i]=0 then begin
    str(i,s);
    write(1,' ');
    for j:=1 to 9-length(s) do write(0);
    write(i);
    bol:=true;
    break;
end;
if bol=false then writeln(2);
end.

var
 n,m,i,j,a,b,f,min:longint;
 k:int64;
 s:string[9];
begin
 readln(a,b,m);
 if b>=m then
 begin
  writeln(2);
  halt;
 end;
 f:=1000000000 mod m;
 if a>=m then min:=m else min:=a;
 for i:=1 to min do
 begin
  k:=trunc((i*f/m-trunc(i*f/m))*m+0.0000005);
  if (k>0)and(k<m-b)then
  begin
   str(i,s);
   write(1,' ');
   for j:=1 to 9 -length(s) do write(0);
   writeln(s);
   halt;
  end;
 end;
 writeln(2);

end.

  uses sysutils;
  var z,x,c,w,i:longint;
  q:int64;
  begin
  readln(z,x,c);
  for w:=1 to z do begin
  q:=w;
  q:=q*100000000;
  q:=q mod c;
  if q>x then begin
  write(1,' ');
  for i:=1 to 9 - length(IntToStr(w)) do
    write(0);
  write(w);
  halt(0);
  end;
  end;
  writeln(2);
  end.

  uses sysutils;
  var z,x,c,w,i,r:longint;
  q:int64;
  begin
  readln(z,x,c);
  if z>c then
  r:=c
  else
  r:=z;
  for w:=1 to r do begin
  q:=w;
  q:=q*1000000000;
  q:=q mod c;
  if q>x then begin
  write(1,' ');
  for i:=1 to 9 - length(IntToStr(w)) do
    write(0);
  write(w);
  halt(0);
  end;
  end;
  writeln(2);
  end.

program Project2;

    var i, a, b, m: longint;
        f, t: int64;
        st: string;

    begin
         readln(a, b, m);
         f := 1000000000 mod m;
         t := f;
         i := 1;
         if b >= m then
         begin
              write('2');
              halt;
         end;
         if f <> 0 then
         while ((t mod m + b) >= m) and (i < a + 1) do
         begin
              inc(i);
              t := t + f;
         end;
         if (i <= a) and (f <> 0) then
         begin
              write('1', ' ');
              str(i, st);
              for i := 1 to 9 - length(st) do write('0');
                   write(st);
         end
         else write('2');
    end.

program Project2;
Uses math;
var v,a,b,mo,k,e:Integer;
m:array [1..10] of integer;
j,i:integer;
begin
//  Assign(input,'input.txt');
//  Assign(Output,'output.txt');
  Readln(a,b,mo);
  v:=1000000000 mod mo;
  for i:=0 to Min(mo,a) do
  begin
    e:=i;
    e:=((i mod mo)*v)mod mo;
    if (mo-e) mod mo>b
    then begin
          Write(1,' ');
          j:=0;
          e:=i;
          while e<>0 do
          begin
            inc(j);
            m[j]:=e mod 10;
            e:=e div 10;
          end;
          for j:=9 downto 1 do
          write(m[j]);
          Halt;
         end;
   end;
   Writeln(2);
end.

const big=1000000000;

var a,b,mo,i,c,j:longint;
    st:string;

begin
  readln(a,b,mo);
  {if b+1>=mo then
    begin
      writeln('2');
      halt;
    end;}
  for i:=1 to a do
    begin
      c:=int64(i)*big mod mo;
      c:=mo-c;
      if c>b then
        begin
          write('1 ');
          str(i,st);
          for j:=1 to 9-length(st) do write('0');
          writeln(st);
          halt;
        end;
      if i>mo then break;
    end;
  writeln('2');
end.

var
i,j:longint;
x,a,b,p,tot:longint;
s:array[0..10]of int64;
y:double;
function min(a,b:int64):int64;
begin
if a<b then exit(a)
        else exit(b);
end;
function work(x:int64):boolean;
begin
        x:=(x*s[10]) mod p;
        if b<p-x then exit(true);
        exit(false);
end;
begin

readln(a,b,p);
s[0]:=-1;s[1]:=1;
for i:=2 to 10 do s[i]:=s[i-1]*10;tot:=0;
for i:=1 to a do
        begin
                x:=i;
                if work(x) then
                        begin
                                write(1,' ');
                                j:=9;
                                while (s[j]>x)and(j>1) do
                                        begin
                                                write(0);
                                                dec(j);
                                        end;
                                writeln(x);
                                halt;
                        end;
                inc(tot);
                if tot=p then break;
        end;
writeln(2);

end.

var a,b,m:longint;
begin
readln(a,b,m);
if (a=0) or (m=1) then
    writeln(2)
else
    if (b>=m) then
        writeln(2)
    else
    writeln('1 000000001');
end.

var i,a,min,m,b,mm:int64;

    function P(x:int64):string;
     var s:string;
     begin
       str(x,s);
       while (length(s)<=9) do
        s:='0'+s;
        p:=s;
     end;
 begin
    readln(a,b,m);
    if m<=2 then writeln(2) else
    if b>m then writeln(2)
     else
      begin
        i:=1;
        while (i<=100000000) and (i<=a) do
        begin
         if (i*1000000000 mod m)<=m-b then
         begin
          writeln(1,' ',p(i));
          halt;
         end;
         i:=i+1;
        end;
        writeln(2);
      end;

 end.

Uses sysutils;
Var
  g,s2,a,b,p,f: longint;
  k,i: int64;

begin
  {assign(input, 'input.txt');
  reset(input);
  assign(output, 'output.txt');
  rewrite(output);}
  read(a,b,p);
  if(a > p) then
    k := p
  else
    k := a;
  for g := 1 to k do
    begin
      i := g;
      if(((p - ((i * 1000000000) mod p) )> b) and (i <> 0)) then
        begin
          write('1 ');
          for f := 1 to 9 - length(IntToStr(i)) do
            write(0);
          write(i);
          exit;
        end;
    end;
  write(2);
end.

  uses
  SysUtils,math;
  var a,b,j,m,i:integer;   mn,c:INT64;
  st:string;
begin
readln(a,b,m);
mn:=1000000000 mod m;
for i:=1 to m-1 do begin
c:=i*mn mod m;
if i>a then break;
if (c=0) or (i>a) then continue;
if c<m-b then begin
    write(1,' ');
    str(i,st);
    while length(st)<9 do st:='0'+st;
    writeln(st);halt;
    end;

end;
writeln(2);
end.

var
 n,m,i,j,a,b,f,min:longint;
 k:integer;
 s:string[9];
begin
 readln(a,b,m);
 if b>=m then
 begin
  writeln(2);
  halt;
 end;
 f:=1000000000 mod m;
 if a>=m then min:=m else min:=a;
 for i:=1 to min do
 begin
  k:=trunc((i*f/m-trunc(i*f/m))*m);
  if (k>0)and(k<m-b)then
  begin
   str(i,s);
   write(1,' ');
   for j:=1 to 9 -length(s) do write(0);
   writeln(s);
   halt;
  end;
 end;
 writeln(2);

end.

var
bol:boolean;
ind,i,j,a,b,m,min:longint;
s:string;
p,x:int64;
begin
readln(a,b,m);
min:=a;
if m-1<min then min:=m-1;
str(b,s);
x:=1;
for i:=1 to length(s) do begin
     x:=x*10;
     bol:=false;
     for j:=1 to min do begin
         p:=j;
         if (p*x) mod m>b then begin
             bol:=true;
             ind:=j;
             break;
         end
     end;
     if bol then break;
     //if bol=false then writeln(i);
end;
if bol then begin
    str(ind,s);
    write(1,' ');
    for i:=1 to 9-length(s) do write(0);
    write(ind);
end
else begin
     writeln(2);
end;
end.

const
                fi='';//'117b.inp';
                fo='';//'117b.out';
                base=1000000000;
var
                f1,f2           :text;
                a,b,modd        :longint;

procedure mof;
begin
 assign(f1,fi);
  reset(f1);
 assign(f2,fo);
  rewrite(f2);
end;

procedure dongf;
 begin
 close(f1);
 close(f2);
 end;

procedure nhap;
 begin
  readln(f1,a,b,modd);
 end;

procedure work;
 var i,t:longint;
   ok:boolean;
  begin
   ok:=true;

   for i:=0 to modd-1 do
    begin
    if i>a then break;
    t:=(i*base)mod modd;
    if (modd-t)mod modd>b then
    begin
     ok:=false;
     break;
    end;
    end;

   if ok then
   writeln(f2,2)
   else
    begin
    write(f2,1,' ');
    t:=i;
    while t<100000000 do
     begin
      write(f2,0);
      t:=t*10;
     end;
     write(f2,i);
    end;

  end;

 begin

 mof;
 nhap;
 work;
 dongf;

 end.

{$R+ Q+ I+}
{$APPTYPE CONSOLE}
uses
  SysUtils;

function make(y : integer) : string;
var
   s,s1 : string;
   i : integer;
begin
     s := inttostr(y);
     s1 := '';
     for i := 1 to 9 - length(s) do s1 := s1 + '0';
     make := s1 + s;
end;

function min(x,y : integer) : integer;
begin
    if x < y then min := x
    else min := y;
end;
var
   a,b,m,i :integer;
   p,e : int64;

begin
     read(a,b,m);
     e := 1000000000;
     for i := 1 to min(a,1000000) do begin
         p := i;
         p := p*e mod m;
         if (m - p > b) and (p > 0) then begin
            writeln(1);
            write(make(i));
            halt;
         end;
     end;
     write(2);
end.

uses math;

var a,b,md,i,x			: longint;

begin
	read(a,b,md);

	for i := 1 to min(a, md) do begin
		x := (int64(i) * 1000000000) mod md;
		if md - x > b then begin
			write('1 ');
			if i < 100000000 then write(0);
			if i < 10000000 then write(0);
			if i < 1000000 then write(0);
			if i < 100000 then write(0);
			if i < 10000 then write(0);
			if i < 1000 then write(0);
			if i < 100 then write(0);
			if i < 10 then write(0);
			write(i);
			halt(0);
                end;
        end;

        writeln(2);
end.

  uses sysutils;
  var z,x,c,w,i,r:longint;
  q:int64;
  begin
  readln(z,x,c);
  if z>c then
  r:=c
  else
  r:=z;
  for w:=1 to r do begin
  q:=w;
  q:=q mod c;
  q:=q*1000000000;
  q:=q mod c;
  if q>x then begin
  write(1,' ');
  for i:=1 to 9 - length(IntToStr(w)) do
    write(0);
  write(w);
  halt(0);
  end;
  end;
  writeln(2);
  end.

var k,i,j,a,b,modd,l:longint;

 function min(a,b:longint):longint;
  begin
   if a>b then min:=b else min:=a;
  end;
   procedure print(x:longint);
    var s:string;
     begin
      write(1,' ');
      str(x,s);
      while length(s)<>9 do
       s:='0'+s;
       write(s);
     end;

  begin
    readln(a,b,modd);
    l:=1000000000 mod modd;
     for i:=1 to min(modd,a) do
      begin
        k:=((i mod modd)*l) mod modd;
      if (k<>0) and (k+b<modd) then
       begin
        print(i);
        halt;
       end;
      end;
     writeln(2);
   end.

var a,b,m:longint;
begin
readln(a,b,m);
if  (m=1) then
    writeln(2)
else
    if (b>=m) then
        writeln(2)
    else
    writeln('1 000000001');
end.

var t,i,a,b,mo,ost:longint;

procedure ch(a:longint);
var b,j,i:longint;
begin
i:=0;
b:=a;
while b>0 do
begin
b:=b div 10;
inc(i);
end;
write(1,' ');
for j:=1 to 9-i do
write(0);
write(a);
end;

begin
readln(a,b,mo);
if b>=mo then begin
write(2);
halt;
end;
ost:=1000000000 mod mo;
t:=ost;
while (((mo-ost)<=b)or(ost=0))and(i<mo) do
begin
ost:=ost+t;
inc(i);
ost:=ost mod mo;
end;
if ((mo-ost)>b)and(ost<>0) then  ch(i+1)
else
write(2);
end.

{$R+} {$Q+} {$O-}
program Project3;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  n, m: longint;
  s, f, t, tt, i, ttt: longint;

begin
  {reset(input, 'input.txt');
  rewrite(output, 'output.txt');
  }
  readln(n, m);

  for i := 1 to n do begin
    readln(s, f, t);
    tt := t;
    if s = f then
      writeln(t)
    else begin
      t := t mod (m * 2 - 2);

      if s < f then begin
        if t < s then
          writeln(tt - t + f - 1)
        else
          writeln(tt - t + 2 * m - 2 + f - 1);
      end else begin
        s := (m - s) + m;
        f := (m - f) + m;

        if t < s then begin
          writeln(tt - t + f - 1);
        end else begin
          writeln(tt - t + 2 * m - 2 + f - 1);
        end;
      end;
    end;
  end;

  {closefile(input);
  closefile(output);
  }
end.

program Project2;
Uses math;
var v,a,b,mo,k,e:Integer;
m:array [1..10] of integer;
j,i:integer;
begin
//  Assign(input,'input.txt');
//  Assign(Output,'output.txt');
  Readln(a,b,mo);
  v:=1000000000 mod mo;
  for i:=0 to Min(mo,a) do
  begin
    e:=i;
    e:=((i mod mo)*v)mod mo;
    if (mo-e) mod mo>b
    then begin
          Write(1,' ');
          j:=0;
          e:=i;
          while e<>0 do
          begin
            inc(j);
            m[j]:=e mod 10;
            e:=e div 10;
          end;
          for j:=9 downto 1 do
          write(m[j]);
          Halt;
         end;
   end;
   Writeln(2);
end.

var
    temp,k,a,b,m:int64;
    i:longint;
    vis:array[0..10000000] of boolean;

function min(a,b:longint):longint;
begin
    min:=a; if (a>b) then exit(b);
end;

begin
    readln(a,b,m);
    if (b>=m-1) then writeln(2)
    else
    begin
        k:=1;
        for i:=1 to m do
        begin
            if (k>a) then begin writeln(2); exit; end;
            if (m-(k*1000000000 mod m)>b) then break;
            if (vis[m-(k*1000000000 mod m)])  then break;
            if ((m-(k*1000000000) mod m=m)) then
            begin
                inc(k);
                continue;
            end;
            vis[m-(k*1000000000 mod m)]:=true;
            k:=(k+1) mod m;
        end;
        write(1,' '); temp:=k;
        for i:=1 to 9-trunc(ln(temp)/ln(10))-1 do
        begin
            write(0);
        end;
        writeln(temp);
    end;
end.

const
{     fi='game.inp';
     fo='game.out';}
     fi='';
     fo='';
     maxn=1;

var
     f:text;
     a:array[0..maxn]of longint;
     n,x,y:longint;
     ss:string;

function maxx(x,y:longint):longint;
begin
     maxx:=x;
     if y>x then maxx:=y;
end;

function minn(x,y:longint):longint;
begin
     minn:=x;
     if y<x then minn:=y;
end;

procedure swap(var x,y:longint);
var  z:longint;
begin
     z:=x;
     x:=y;
     y:=z;
end;

procedure qsort(l,r:longint);
var  tmp,mid,i,j:longint;
begin
     if l>=r then exit;
     i:=l;j:=r;
     mid:=a[(l+r) div 2];
     repeat
          while a[i]<mid do inc(i);
          while a[j]>mid do dec(j);
          if i<=j then
          begin
               swap(a[i],a[j]);
               inc(i);
               dec(j);
          end;
     until i>j;
     qsort(l,j);
     qsort(i,r);
end;

procedure open;
var  i:longint;
begin
     assign(f,fi);reset(f);
     readln(f,x,y,n);
     close(f);
end;

function tinh:longint;
var  i,kq,s,j:longint;
begin
     i:=trunc(1e9) mod n;
     if y>=n then exit(2);
     for j:=0 to minn(x,n) do
     begin
          s:=(n-((j+i) mod n)+1) mod n;
          if j=0 then s:=0;
          if s>y then
          begin
               str(j,ss);
               while length(ss)<9 do ss:='0'+ss;
               exit(1);
          end;
     end;
     exit(2);
end;

procedure main;
var  tmp:longint;
begin
     tmp:=tinh;
     assign(f,fo);rewrite(f);
     write(f,tmp,' ');
     if tmp=1 then writeln(f,ss);
     close(f);
end;

begin
     open;
     main;
end.

var
i,j:longint;
x,a,b,p:longint;
s:array[0..10]of int64;
y:double;
function min(a,b:int64):int64;
begin
if a<b then exit(a)
        else exit(b);
end;
function work(x:int64):boolean;
begin
        x:=x*s[10] mod p;
        if b<p-x then exit(true);
        exit(false);
end;
begin

readln(a,b,p);
s[0]:=-1;s[1]:=1;
for i:=2 to 10 do s[i]:=s[i-1]*10;
for i:=1 to min(a,p) do
        begin
                x:=i;
                if work(x) then
                        begin
                                write(1,' ');
                                j:=9;
                                while (s[j]>x)and(j>1) do
                                        begin
                                                write(0);
                                                dec(j);
                                        end;
                                writeln(x);
                                halt;
                        end;
        end;
writeln(2);

end.

 uses
  SysUtils,math;
  var a,b,j,m,i,count:integer;   mn,c:int64;
  st:string;
begin
readln(a,b,m);
mn:=1000000000 mod m;
for i:=1 to m-1 do begin
c:=i*mn mod m;
if i>a then break;
if (c=0) or (i>a) then continue;
if c<m-b then begin
    write(1,' ');
    str(i,st);
    while length(st)<9 do st:='0'+st;
    writeln(st);
    readln;halt;
    end;

end;
writeln(2);
end.

 uses
  SysUtils,math;
  var a,b,j,m,i,count:integer;   mn,c:longword;
  st:string;
begin
readln(a,b,m);
mn:=1000000000 mod m;
for i:=1 to m-1 do begin
c:=i*mn mod m;
if (c=0) or (i>a) then continue;
if c<m-b then begin
    write(1,' ');
    str(i,st);
    while length(st)<9 do st:='0'+st;
    writeln(st);
    readln;halt;
    end;

end;
writeln(2);
end.

var
        a,b,m,i,k,t:Longint;
begin
        read(a,b,m); k:=1000000000 mod m;
        if b>=m then begin writeln(2); exit end;
        a:=a mod m;
        for i:=0 to a do begin
          t:=(int64(i)*k) mod m;
          if (m-t) mod m>b then begin
            write(1,' ');
            a:=i; k:=0; repeat inc(k); a:=a div 10 until a=0;
            for t:=1 to 9-k do write(0);
            writeln(i);
            exit;
          end;
        end;
        writeln(2);
end.

  uses sysutils;
  var z,x,c,w,i,r:longint;
  q:int64;
  begin
  readln(z,x,c);
  if z>c then
  r:=c
  else
  r:=z;
  for w:=1 to r do begin
  q:=w;
  q:=q*1000000000;
  q:=q mod c;
  if (c-q)>x then begin
  write(1,' ');
  for i:=1 to 9 - length(IntToStr(w)) do
    write(0);
  write(w);
  halt(0);
  end;
  end;
  writeln(2);
  end.

var a,b,md,i:longint;

function min(md,a:longint):longint;
begin
 if md>a then min:=a else min:=md;
end;

procedure print(i:longint);
var s:string;
begin
 str(i,s);
 while length(s)<>9 do
  s:='0'+s;
  writeln(1,' ',s);
 halt;
end;

function fun(ver:int64):boolean;
var ans:int64;
begin
 ans:=(ver*1000000000) mod md;
 if (ans<>0) and (Ans+b<=md) then
fun:=true else fun:=false;
end;

begin
 readln(a,b,md);
 for i:= 0 to min(md,a) do
  if fun(i) then
    print(i);

  writeln(2);
end.

program Project3;

{$APPTYPE CONSOLE}

uses
  SysUtils, Math;
var
  b, i, j, modn, modd, a: longint;
  ii: int64;
  ss: string;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');

  readln(a, b, modn);

  for i := 1 to min(a, modn) do begin
    ii := 1000000000 * i;
    modd := ii mod modn;
    if modd + b < modn then begin
      ss := inttostr(i);
      write('1 ');
      for j := 1 to 9 - length(ss) do
        write(0);
      write(i);
      halt(0);
    end;
  end;

  writeln(2);

  //closefile(input);
  //closefile(output);
end.

var a,b,m:longint;
begin
readln(a,b,m);
if (a=0) or (m=1) then
    writeln(2)
else
    if (b>=m) then
        writeln(2)
    else
    writeln('1 000000001');
end.

var
	temp,k,a,b,m:int64;
	i:longint;
	vis:array[0..10000000] of boolean;

function min(a,b:longint):longint;
begin
	min:=a; if (a>b) then exit(b);
end;

begin
	readln(a,b,m);
	if (b>=m-1) then writeln(2)
	else
	begin
		k:=1;
		for i:=1 to a do
		begin
			if (vis[m-(k*1000000000 mod m)]) or (k=0) then break;
			vis[m-(k*1000000000 mod m)]:=true;
			k:=(k+1) mod m;
		end;
		for i:=m downto b+1 do
		begin
			if (vis[i]) then break;
			if (i=b+1) then
			begin
				writeln(2);
				exit;
			end;
		end;
		write(1,' '); temp:=m-i;
		for i:=1 to 9-trunc(ln(i)/ln(10))-1 do
		begin
			write(0);
		end;
		writeln(temp);
	end;
end.

var a,b,m,i:longint;
label 1;
begin
readln(a,b,m);
if (a=0) or  (m=1) then
    writeln(2)
else
begin
    for i:=1000000000 to (1000000000+b)   do
        if ((i mod m)=0)     then  begin
            writeln(2);      goto 1;end;
          writeln('1 000000001');
     end;
1: end.

  uses sysutils;
  var z,x,c,w,i,r:longint;
  q:int64;
  begin
  readln(z,x,c);
  if z>c then
  r:=c
  else
  r:=z;
  for w:=1 to r do begin
  q:=w;
  q:=q*1000000000;
  q:=q mod c;
  if q>x then begin
  write(1,' ');
  for i:=1 to 9 - length(IntToStr(w)) do
    write(0);
  write(w);
  halt(0);
  end;
  end;
  writeln(2);
  end.

var
bol:boolean;
mas:array[-10..10000000]of longint;
ind,i,j,a,b,m,min:longint;
s:string;
p,x:int64;
begin
readln(a,b,m);
min:=a;
if m-1<min then min:=m-1;
str(b,s);
x:=1;
for i:=1 to length(s) do begin
     x:=x*10;
     bol:=false;
     for j:=1 to min do begin
         p:=j;
         if (p*x) mod m<=b then begin
           //  bol:=true;
             mas[j]:=1;
         end
     end;
end;
bol:=false;
for i:=1 to min do if mas[i]=0 then begin
    str(i,s);
    write(1,' ');
    for j:=1 to 9-length(s) do write(0);
    write(i);
    bol:=true;
    break;
end;
if bol=false then writeln(2);
end.

Uses
    math;
Var
    a,b,m,i,miin: longint;
     s,s1: string;
      ch: int64;

Begin

  readln(a,b,m);
   miin:=min(a,m);
    for i:=1 to miin do
     begin
      ch:=i;
       ch:=ch*1000000000;
        if ch mod m > b
         then
          begin
           s:='';
            ch:=i;
             while ch<>0 do
              begin
               str(ch mod 10,s1);
                ch:=ch div 10;
                 s:=s1+s;
              end;
           while length(s) <> 9 do s:='0'+s;
            s:='1 '+s;
             writeln(s);
              halt;
          end;
     end;
  writeln(2);

End.

uses math;

const fi='';//117b.inp';
      fo='';//117b.out';
      maxn=10000100;
var du_b:array[0..maxn] of boolean;
    n,a,b,m,nn:longint;
    re:string;
    ok:boolean;
    f:text;

procedure nhap;
begin
     assign(f,fi); reseT(f);
     readln(f,a,b,m);
     close(f);
end;

procedure khoitao;
var i:longint;
begin
     nn:=1000000000 mod m;
     for i:=0 to b do
          du_b[i]:=true;
end;

procedure work;
var s:longint;
begin
     s:=0;
     ok:=false;
     while s<=min(a,m) do
     begin
          if not du_b[(m-(nn*s) mod m+m) mod m] then
          begin
               str(s,re);
               ok:=true;
               exit;
          end;
          inc(s);
     end;
end;

procedure inkq;
begin
     assign(f,fo); rewrite(f);
     if b>=m then writeln(f,2)
     else
     begin
          khoitao;
          work;
          if ok then
          begin
               while length(re)<9 do re:='0'+re;
               write(f,1,' ',re);
          end
          else writeln(f,2);
     end;
     close(f);
end;

begin
     nhap;
     inkq;
end.

Const
        Fi      =       '117B.inp';
        Fo      =       '117B.out';

Var
        F       :       Text;
        A, B, k,i :       Longint;
        Res, cs, tg  :       Longint;
        m, j: Int64;

BEGIN
        Readln(A, b, k);
        If k=1 then  Begin  Writeln(2);  Exit;  End;
        If b>=k then  Begin  Writeln(2);  Exit;  End;
        If a+b<k then  Begin  Writeln(1, ' ', '000000001'); Exit;  End;
        tg:= 1000000000 mod k;

        For i:= 0 to (a-1) mod k+1 do
          Begin
                j:= i;
                m:= (j* tg) mod k;
                If b<=(k-m) mod k then  Begin  Writeln(1,' ', '000000001');  Exit;  End;
          End;
        Write(2);
END.

program task;

{$APPTYPE CONSOLE} {$O+,R-,S-,Q-,I-}

uses
  Math,
  SysUtils;

var k, x, i, a, b, md, pp : longint;
    s : string;

begin
    readln(a, b, md);
    if md = 1 then writeln(2) else begin
        x := (1000 * 1000 * 1000) mod md;
        a := min(a, md);
        for i := 1 to a do begin
            pp := (int64(i) * int64(x)) mod md;
            if ((md - pp) mod md <= b) then begin
                writeln(1);
                s := inttostr(i);
                k := 9 - length(s);
                while (k > 0) do begin
                    write('0');
                    dec(k);
                end;
                writeln(s);
                halt(0);
            end;
        end;
        writeln(2);
    end;
    halt(0);
end.

var n,m,i,j,k,l,s,f,t:integer;
a,b,c,d,e:integer;
i1,k1:int64;
begin
read(a,b,m);
d:=1000000000;
if d mod m =0 then begin writeln(2);exit;end;
k1:=d mod m;
for i:=1 to 10000000 do
  begin
i1:=i;
l:=(i1*k1)mod m;
if l<>0 then l:=m-l;
if l>b then
    begin
write(1,' ');
s:=i;
f:=0;
while s<>0 do
      begin
inc(f);
s:=s div 10;
      end;
for j:=1 to 9-f do write(0);
writeln(i);
exit;
    end;
  end;
writeln(2);
//readln;readln;
end.