Language: C++

#include <iostream>
int main(void){
   double W,H,x,y,A,B;
   cin >> W >> H >> x >> y;
   A=(W-x)*H;
   B=(H-y)*W;
   if(A<W*H-A){if(B<W*H-B){if(A<B){cout << A <<" "<<"0";}else{cout<<B<<" "<<"0";}}}
    
    if(A<W*H-A){if(B>W*H-B){if(A<(W*H-B)){cout << A <<" "<<"0";}else{cout<<W*H-B<<" "<<"0";}}}
    
    if(A>W*H-A){if(B<W*H-B){if((W*H-A)<B){cout << W*H-A<<" "<<"0";}else{cout<<B<<" "<<"0";}}}
    
    if(A>W*H-A){if(B>W*H-B){if((W*H-A)<(W*H-B)){cout << W*H-A <<" "<<"0";}else{cout<<W*H-B<<" "<<"0";}}}
    
   
    if(A==W*H-A){if(B==W*H-B){cout<< A <<" "<<"1";}else{cout<< A <<" "<<"0";}}
    if(A!=W*H-A){if(B==W*H-B){cout<<B <<" "<< "0";}}
    
       
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:4: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |    cin >> W >> H >> x >> y;
      |    ^~~
      |    std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:36: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |    if(A<W*H-A){if(B<W*H-B){if(A<B){cout << A <<" "<<"0";}else{cout<<B<<" "<<"0";}}}
      |                                    ^~~~
      |                                    std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:63: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |    if(A<W*H-A){if(B<W*H-B){if(A<B){cout << A <<" "<<"0";}else{cout<<B<<" "<<"0";}}}
      |                                                               ^~~~
      |                                                               std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:43: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     if(A<W*H-A){if(B>W*H-B){if(A<(W*H-B)){cout << A <<" "<<"0";}else{cout<<W*H-B<<" "<<"0";}}}
      |                                           ^~~~
      |                                           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:70: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     if(A<W*H-A){if(B>W*H-B){if(A<(W*H-B)){cout << A <<" "<<"0";}else{cout<<W*H-B<<" "<<"0";}}}
      |                                                                      ^~~~
      |                                                                      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:43: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     if(A>W*H-A){if(B<W*H-B){if((W*H-A)<B){cout << W*H-A<<" "<<"0";}else{cout<<B<<" "<<"0";}}}
      |                                           ^~~~
      |                                           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:73: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     if(A>W*H-A){if(B<W*H-B){if((W*H-A)<B){cout << W*H-A<<" "<<"0";}else{cout<<B<<" "<<"0";}}}
      |                                                                         ^~~~
      |                                                                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:49: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     if(A>W*H-A){if(B>W*H-B){if((W*H-A)<(W*H-B)){cout << W*H-A <<" "<<"0";}else{cout<<W*H-B<<" "<<"0";}}}
      |                                                 ^~~~
      |                                                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:80: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     if(A>W*H-A){if(B>W*H-B){if((W*H-A)<(W*H-B)){cout << W*H-A <<" "<<"0";}else{cout<<W*H-B<<" "<<"0";}}}
      |                                                                                ^~~~
      |                                                                                std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:31: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     if(A==W*H-A){if(B==W*H-B){cout<< A <<" "<<"1";}else{cout<< A <<" "<<"0";}}
      |                               ^~~~
      |                               std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:57: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     if(A==W*H-A){if(B==W*H-B){cout<< A <<" "<<"1";}else{cout<< A <<" "<<"0";}}
      |                                                         ^~~~
      |                                                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:31: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     if(A!=W*H-A){if(B==W*H-B){cout<<B <<" "<< "0";}}
      |                               ^~~~
      |                               std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~