Prompt-based Depth Pruning of Large Language Models