Relay does not open?

Hi,
So I’ve been trying to read data from photoresistors, as long as its dark, relays should be closed and power el wire. When photoresistor catches first strong light, relays are still in closed position, but when the lights are gone, relays open and stop powering. Then it should close relay when light is on again. What is strange, that when I power arduino and light is off, relay LED is on, but no power to el wire. When I turn on and off the lighting, relays work perfectly. My code:

int k = 2;
int d = 3;
int fk = A0;
int fd = A1;
int a = 0;
int b = 0;


void setup() {
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  Serial.begin(9600);
}

void loop() 
    {
    a = analogRead (fk);
    b = analogRead (fd);
    if (a<1000 && b<1000)
    {digitalWrite(2, HIGH);
    digitalWrite(3, HIGH);}
    if (a>=1000)
    digitalWrite(2, HIGH);
    else 
    digitalWrite(2, LOW);
    if (b>=1000)
    digitalWrite(3, HIGH);
    else
    digitalWrite(3, LOW);
    }
int k = 2;

int d = 3;
int fk = A0;
int fd = A1;
int a = 0;
int b = 0;

Variable names are free. The name isn't downloaded to the Arduino so long names don't take up any more memory than single-letter names.

Give your variables and functions descriptive names.

    {digitalWrite(2, HIGH);

digitalWrite(3, HIGH);}

After naming the pins, you never use the names!

Also, don't put any code after a { or before a }. Put them on their own lines. Then run the auto-format tool to indent the lines properly. It will make your code 1000% easier to read.

The compiler doesn't care. It never complains about "difficult to read" but the purpose of code is for the programmer to read it. If the programmer never has to read it, we could write programs in binary and never look at them again.