Create a Python program to classify emails into two categories: spam and ham.
import re

def is_spam(email):
    pattern = r'viagra|cialis|pharmacy'
    if re.search(pattern, email):
        return True
    else:
        return False