def get_contacts(filename):
    """
    Function to get all the name and email IDs of contacts in separate lists
    :param filename: File containing contact list
    :return: lists containing names and emails
    """
    names = []
    emails = []
    with open(filename, encoding='utf-8') as contacts_file:
        for contact in contacts_file:
            names.append(contact.split()[0])
            emails.append(contact.split()[1])
    return names, emails