public static void main ( String [ ] args ) {
  Scanner in = new Scanner ( System . in ) ;
  long a = in . nextLong ( ) ;
  long b = in . nextLong ( ) ;
  long c = in . nextLong ( ) ;
  long d = in . nextLong ( ) ;
  double A = ( double ) a , B = ( double ) b , C = ( double ) c , D = ( double ) d ;
  if ( Math . abs ( A / B - C / D ) <= 1e-9 ) {
    System . out . println ( "0/1" ) ;
  }
  else if ( C / D > A / B ) {
    long ans1 = b * c - a * d ;
    long ans2 = b * c ;
    long cp = gcd ( ans1 , ans2 ) ;
    System . out . println ( ans1 / cp + "/" + ans2 / cp ) ;
  }
  else if ( C / D < A / B ) {
    long ans1 = a * d - b * c ;
    long ans2 = a * d ;
    long cp = gcd ( ans1 , ans2 ) ;
    System . out . println ( ans1 / cp + "/" + ans2 / cp ) ;
  }
}

public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; long a = in . nextLong ( ) ; long b = in . nextLong ( ) ; long c = in . nextLong ( ) ; long d = in . nextLong ( ) ; double A = ( double ) a , B = ( double ) b , C = ( double ) c , D = ( double ) d ; if ( Math . abs ( A / B - C / D ) <= 1e-9 ) { System . out . println ( "0/1" ) ; } else if ( C / D > A / B ) { long ans1 = b * c - a * d ; long ans2 = b * c ; long cp = gcd ( ans1 , ans2 ) ; System . out . println ( ans1 / cp + " / " + ans2 / cp ) ; } else if ( C / D < A / B ) { long ans1 = a * d - b * c ; long ans2 = a * d ; long cp = gcd ( ans1 , ans2 ) ; System . out . println ( ans1 / cp + " / " + ans2 / cp ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (floating_point_type) value: (identifier))) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (floating_point_type) value: (identifier))) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (floating_point_type) value: (identifier))) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (floating_point_type) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))))) right: (decimal_floating_point_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (string_literal)) right: (binary_expression left: (identifier) right: (identifier))))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (string_literal)) right: (binary_expression left: (identifier) right: (identifier))))))))))))