differences bdifferences between ERP and Customer Relationship Management (CRM) software

What are the differences between ERP and Customer Relationship Management (CRM) software? In what ways do they complement each other? What is the best use of each?