Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- s,q:string;
- i,w,j:integer;
- m:int64;
- begin
- assign(input,'input.txt');reset(input);
- assign(output,'output.txt');rewrite(output);
- read(s);
- for i:=1 to length(s) do
- begin
- if(ord(s[i])>47)and(ord(s[i])<58) then
- begin
- if s[i]<'6' then
- if (ord(s[i+1])>47)and(ord(s[i+1])<58) then w:=1;
- if s[i]>'5' then w:=1;
- end;
- end;
- if w=1 then write('NO') else write('YES');
- close(input);
- close(output);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement