Instructing Large Language Models to Identify and Ignore Irrelevant Conditions