program Project2; {$APPTYPE CONSOLE} uses SysUtils; var inp,outp: textfile; n: array[1..3] of integer; s: string; a: integer; begin assignfile(inp,'Task2.in'); assignfile(outp,'Task2.out'); reset(inp); rewrite(outp); readln(inp,s); n[1]:=StrToInt(copy(s,1,1)); n[2]:=StrToInt(copy(s,3,1)); n[3]:=StrToInt(copy(s,5,1)); a:=0; if copy(s,2,1)='+' then a:=n[1]+n[2] else if copy(s,2,1)='-' then a:=n[1]-n[2] else a:=n[1]*n[2]; if copy(s,4,1)='+' then a:=a+n[3] else if copy(s,4,1)='-'then a:=a-n[3] else a:=a*n[3]; if a=StrToInt(copy(s,7,1)) then writeln(outp,'YES') else writeln(outp,'NO'); closefile(inp); closefile(outp); end.