Require or AND in IF expression

I have this if expression which works just fine, it checks balanceOf(msg.sender), and then reacts accordingly, BUT..

Can I put in an AND (which does not seem to exist in solidity), or can I require something?

This is the expression:

if (continents == 1) {
continents = 1;
} else {
continents = 0;
}

And I would like to include a

require factory == 5

Can this be done somehow?

Will this work:

      if (continents == 1 && factory == 1) {
          continents = 1;
      } else {
          continents = 0;
      }

I am not getting any compiling errors.....

and = &&
or = ||
example (and):

if(Blue == True && Yellow == False) {
 Red = False;
}

example (or):

if(Blue == False || Yellow = True) {
 Red = True;
}