if "11" & "4" are output pins, you can not use in this place. Those should be input or the boolean variable where you can store input/output/constant values.
if ( 11 == HIGH && 4 == HIGH && dly<= 500 )
Note: better assign name for each and every pin and use in code.
If the pin is an output then presumably the program sets it HIGH or LOW. Save this state in a variable when you do the digitalWrite() to the pin and use it later when you need to know the current state. No need for digitalRead() at all.