Ernest Hemingway famously said, “Write drunk, edit sober.” But while most careerists would favor a Starbucks latte over a Miller Light when heading to work in the morning, Hemingway’s saying does have some validity.

It turns out that there are in fact scientific processes behind why both beer and coffee can affect your work performance for the better. Though we wouldn’t recommend consuming vast amounts of either beverage (or imbibing at work), there are gains that can be made drinking in moderation—i.e., it could be worth considering having more brainstorming sessions at happy hour.

Read the infographic below to see how your creativity and productivity can be boosted (or diminished) based on what you drink.

Infographic courtesy of ilovecoffee.jp. Photo of drinks courtesy of Shutterstock.