When ever the voltages at the inputs become unequal to each other the output goes directly to the positive rail voltage during the ac signal positive cycle and goes to the rails negative voltage during the negative ac cycle , giving you a square wave in the positive and negative voltages (rail voltage here is +15v and -15v)