Implementation of AND (Nested Loop)