The Philadelphia 76ers play the Miami Heat on Wednesday night in a battle for Miami's 2015 first-round draft pick.

The situation is simple: Both teams have to lose.

Miami originally traded its 2015 first-round pick to Cleveland in 2010 as part of the LeBron James sign-and-trade. Last summer, Philadelphia acquired the pick from Cleveland as part of the Kevin Love trade.

The catch: The pick is top-10-protected. The Heat keep it if it's one of the top-10 picks in the draft, but the Sixers get if it's pick No. 11 or later.

Right now the Heat — who were eliminated from playoff contention on Tuesday — have the 10th-worst record in the league. If they lose to Philly, they will stay in that position and will have about a 90.9% chance of keeping their pick.

If they win, things get more complicated.

Brooklyn is one game ahead of Miami in the standings. If the Nets lose to the Orlando Magic on Wednesday and the Heat win, a coin flip will decide which team is 10th and which team is 11th in the NBA Draft lottery.

Based on the lottery odds, the Heat would have only a 2.9% chance of keeping their pick if they lost that coin loss to the Nets and finished 11th.

If Miami wins, they need help to keep their draft pick. Either Brooklyn has to beat Orlando, or Miami has to win the lottery coin toss.

So the scenarios look like this. Only a loss avoids the nightmare scenario:

Miami loses: 90.9% chance they keep their pick

Miami wins, Brooklyn loses: 46.9% chance they keep their pick (90.9% chance if they win coin toss, 2.9% chance if they lose the coin toss)

Miami wins, Brooklyn wins: 90.9% chance they keep their pick

What makes this game doubly odd is that the Sixers want to lose, too.

Not only will it dramatically improve their chances of getting that Miami pick (as detailed above), but it could also improve their chances of grabbing the No. 1 pick in the draft.

Right now, Philly has the third-worst record in the league, one game behind the New York Knicks. If the suddenly hot Knicks win again on Wednesday and the Sixers lose, they'll move into a tie for the second-worst record and have a better shot at getting the top pick.