Need help for my arduino project PLEASE ANYONE!

Ok so here a bigger aproach to my final project. I now have a 2x2 grid. the row of 2 light sensors uses digital inputs and the column of 2 light sensors uses analog inputs. how do i make it so that the latch will be using a a digital sensor the the row and a analog sensor from the column rather then both digital. Also i have 4 different areas of interruption so im assuming i would need 4 separate functions. Would i just put them all together. Any Help will be greatly apreciated. Thank you. BTW heres my approach it returned an error so I obviously did something wrong. FYI 40 is the value that that the sensor reads when the lights are shining and like 400 is the reading when the light is blocked.

byte LEDpin = 13; //on-board LED
byte ButtonPin = 2; //digital pin 2
byte ButtonPin2 = A0;
boolean button, lastState = LOW;
boolean button2, lastState2 = 50;
boolean latch = false;

void setup() {
  pinMode(LEDpin, OUTPUT);
  pinMode(ButtonPin, INPUT);
  pinMode(ButtonPin2, INPUT);
}

void loop() 
{
  button = digitalRead(ButtonPin);
  button2 = analogRead(ButtonPin2);
  if ( button != lastState && button2 !< lastState2) 
  {
    if(button == HIGH && button2 > 50 )
      latch = !latch;


    if(latch == true)
      digitalWrite(LEDpin, HIGH);
    else 
      digitalWrite(LEDpin, LOW);

    lastState = button;
    lastState2 = button2;
  }
}

PROBLEMS - forum project help.ino:18:39: error: expected ')'
if ( button != lastState && button2 !< lastState2)
^
forum project help.ino:18:6: note: to match this '('
if ( button != lastState && button2 !< lastState2)
^
1 error generated.