Chain of Logic: Rule-Based Reasoning with Large Language Models