Use 3 local int then checks conditions