Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.42 KB | None | 0 0
  1. var
  2. s,q:string;
  3. i,w,j:integer;
  4. m:int64;
  5. begin
  6. assign(input,'input.txt');reset(input);
  7. assign(output,'output.txt');rewrite(output);
  8. read(s);
  9. for i:=1 to length(s) do
  10. begin
  11.  if(ord(s[i])>47)and(ord(s[i])<58) then
  12.  begin
  13.   if s[i]<'6' then
  14.         if (ord(s[i+1])>47)and(ord(s[i+1])<58) then w:=1;
  15.   if s[i]>'5' then w:=1;
  16.  end;
  17.  end;
  18. if w=1 then write('NO') else write('YES');
  19. close(input);
  20. close(output);
  21. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement