IDENTIFICATION DIVISION.
PROGRAM-ID. A-WHITE.
 
DATA DIVISION.
WORKING-STORAGE SECTION.
01 INP      PIC X(100).
01 IN-DATA.
   03 DT-X1 PIC X(10).
   03 DT-X2 PIC X(10).
01 IN-LEN.
   03 DT-L1 PIC 9(2).
   03 DT-L2 PIC 9(2).
01 IN-BH    PIC 9(2).
01 IN-BW    PIC 9(2).
01 IN-SH    PIC 9(2).
01 IN-SW    PIC 9(2).
01 OUT-WHT  PIC ZZ9.
 
PROCEDURE DIVISION.
MAIN-001.
  ACCEPT INP.
  UNSTRING INP DELIMITED BY ALL ' '
      INTO DT-X1 COUNT IN DT-L1
           DT-X2 COUNT IN DT-L2.
  MOVE DT-X1(1:DT-L1) TO IN-BH.
  MOVE DT-X2(1:DT-L2) TO IN-BW.
 
  ACCEPT INP.
  UNSTRING INP DELIMITED BY ALL ' '
      INTO DT-X1 COUNT IN DT-L1
           DT-X2 COUNT IN DT-L2.
  MOVE DT-X1(1:DT-L1) TO IN-SH.
  MOVE DT-X2(1:DT-L2) TO IN-SW.
 
  COMPUTE OUT-WHT = (IN-BH - IN-SH) * (IN-BW - IN-SW).  
 
  DISPLAY OUT-WHT.
 
MAIN-EXIT.
  STOP RUN.