from bs4 import BeautifulSoup


def scrape_problem(html):
    """Scrape the sample data and sample output from a problem page and return them."""
    soup = BeautifulSoup(html, 'lxml')
    results = [tag.string.strip() for tag in soup.find_all('div', class_='codehilite')[-2:]]
    return results