Josh Allen threw two touchdown passes, James Cook scored on a 5-yard run and finished with 120 yards rushing, and the Buffalo Bills leaned on a balanced offensive attack in a 31-7 win over the Denver Broncos in a wild-card playoff game.