(* Решение задачи "Координатные четверти" - Алексей Филатов, 10 класс *)
program ideone;
begin
program p1;
var
input, output: text;
x1, y1, x2, y2, c1, c2: integer ;
begin
assign( input, 'input.txt' ) ;
reset( input) ;
assign( output, 'output.txt' ) ;
rewrite( output) ;
readln ( input, x1) ;
readln ( input, y1) ;
readln ( input, x2) ;
readln ( input, y2) ;
if ( x1 > 0 ) and ( y1 > 0 ) then c1 : = 1 ;
if ( x1 < 0 ) and ( y1 > 0 ) then c1 : = 2 ;
if ( x1 < 0 ) and ( y1 < 0 ) then c1 : = 3 ;
if ( x1 > 0 ) and ( y1 < 0 ) then c1 : = 4 ;
if ( x2 > 0 ) and ( y2 > 0 ) then c2 : = 1 ;
if ( x2 < 0 ) and ( y2 > 0 ) then c2 : = 2 ;
if ( x2 < 0 ) and ( y2 < 0 ) then c2 : = 3 ;
if ( x2 > 0 ) and ( y2 < 0 ) then c2 : = 4 ;
if c1 = c2 then write ( output, 'YES' )
else write ( output, 'NO' ) ;
close( input) ;
close( output) ;
end .
end .
KCog0KDQtdGI0LXQvdC40LUg0LfQsNC00LDRh9C4ICLQmtC+0L7RgNC00LjQvdCw0YLQvdGL0LUg0YfQtdGC0LLQtdGA0YLQuCIgLSDQkNC70LXQutGB0LXQuSDQpNC40LvQsNGC0L7QsiwgMTAg0LrQu9Cw0YHRgSAqKQoKcHJvZ3JhbSBpZGVvbmU7CmJlZ2luCglwcm9ncmFtIHAxOwogCnZhcgogIGlucHV0LCBvdXRwdXQ6IHRleHQ7CiAgeDEsIHkxLCB4MiwgeTIsIGMxLCBjMjogaW50ZWdlcjsKIApiZWdpbgogIGFzc2lnbihpbnB1dCwgJ2lucHV0LnR4dCcpOwogIHJlc2V0KGlucHV0KTsKICBhc3NpZ24ob3V0cHV0LCAnb3V0cHV0LnR4dCcpOwogIHJld3JpdGUob3V0cHV0KTsKICByZWFkbG4oaW5wdXQsIHgxKTsKICByZWFkbG4oaW5wdXQsIHkxKTsKICByZWFkbG4oaW5wdXQsIHgyKTsKICByZWFkbG4oaW5wdXQsIHkyKTsKICBpZiAoeDEgPiAwKSBhbmQgKHkxID4gMCkgdGhlbiBjMSA6PSAxOwogIGlmICh4MSA8IDApIGFuZCAoeTEgPiAwKSB0aGVuIGMxIDo9IDI7CiAgaWYgKHgxIDwgMCkgYW5kICh5MSA8IDApIHRoZW4gYzEgOj0gMzsKICBpZiAoeDEgPiAwKSBhbmQgKHkxIDwgMCkgdGhlbiBjMSA6PSA0OwogIGlmICh4MiA+IDApIGFuZCAoeTIgPiAwKSB0aGVuIGMyIDo9IDE7CiAgaWYgKHgyIDwgMCkgYW5kICh5MiA+IDApIHRoZW4gYzIgOj0gMjsKICBpZiAoeDIgPCAwKSBhbmQgKHkyIDwgMCkgdGhlbiBjMiA6PSAzOwogIGlmICh4MiA+IDApIGFuZCAoeTIgPCAwKSB0aGVuIGMyIDo9IDQ7CiAgaWYgYzEgPSBjMiB0aGVuIHdyaXRlKG91dHB1dCwgJ1lFUycpCiAgZWxzZSB3cml0ZShvdXRwdXQsICdOTycpOwogIGNsb3NlKGlucHV0KTsKICBjbG9zZShvdXRwdXQpOwplbmQuCgplbmQu
compilation info
Free Pascal Compiler version 2.6.4+dfsg-4 [2014/10/14] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for i386
Compiling prog.pas
prog.pas(5,2) Error: Illegal expression
prog.pas(5,10) Fatal: Syntax error, ";" expected but "identifier P1" found
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
stdout