module displayLight(in,safe,light);
input [4:0] in;
input safe;
//display current LED light
output [2:0] light;
reg [2:0] light;

always@(in&&safe)
begin
    if(safe)
    begin
        //display green one
        if(in>=5'd13&&in<=5'd3) light=3'b100;
        //display yellow one
        else light=3'b010;
    end
    //display red one
    else light=3'b001;
end
endmodule