On the Planning Abilities of Large Language Models: A Critical Investigation