Connecting 2 IR sensors to arduino

hey guys i am also working on a similar project but instead of reading values from analog pin i use this code

#include <IRremote.h>
int pin1 = 8;
int pin2 = 9;

IRrecv irrecv(pin1);
decode_results results;

IRrecv irrecv2(pin2);
decode_results results2;

void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
irrecv2.enableIRIn();

}

void loop()
{
if (irrecv.decode(&results))
{
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
if (irrecv2.decode(&results2))
{
Serial.println(results.value, HEX);
irrecv2.resume(); // Receive the next value
}

}

but only from pin 9 sensor is reading pin 8 is not working . what can be the reason ?
Please help guys