void setup() 
{
  pinMode(13,OUTPUT);
  pinMode(12,OUTPUT);
  pinMode(2,INPUT_PULLUP);
  pinMode(3,INPUT_PULLUP);
}

void loop() 
{
  if(digitalRead(3)==0)
  {
    if(digitalRead(2)==0) digitalWrite(13,HIGH);
    if(digitalRead(2)==1) digitalWrite(12,HIGH);

    while(digitalRead(3)==0);
    digitalWrite(13,LOW);
    digitalWrite(12,LOW);
  }

}