How to differentiate category and product page in magento

Here, We will explain How to differentiate category and product page in magento?

The code for category page:

The code for product page: