(AP Photo/Matt Rourke)

The San Francisco 49ers fired Coach Jim Tomsula on Sunday night, not long after the end of their 5-11 season. They’re now looking for their third coach in three seasons, and the applications began coming in even before Tomsula got the hook.

The feeling apparently is mutual between Kelly — himself recently fired by the Philadelphia Eagles — and the 49ers.

Kelly-to-the-49ers makes a certain amount of sense. He reportedly remains close with Tom Gamble, San Francisco’s senior personnel executive whom Kelly hired in Philadelphia before the 2013 season. Eagles executive vice president Howie Roseman fired Gamble, however, after the 2014 season in a front-office shakeup.

The 49ers also have Colin Kaepernick, a quarterback who would seem to fit nicely into Kelly’s offense.

Shanahan, 63, has been out of football since he was fired by the Washington Redskins after the 2013 season. He was the 49ers’ offensive coordinator from 1992 to 1994, helping the team win a Super Bowl after the 1994 season.

Shanahan reportedly is interviewing with the Miami Dolphins about their opening, as well.

Both Rapoport and ESPN’s Adam Schefter and Chris Mortensen also say Sean Payton could move west should he part ways with the New Orleans Saints. Payton’s daughter, Meghan, attends Pepperdine University in Malibu, Calif.

One sticking point in regards to Payton could be his contract status with the Saints. He has two years left on his deal, and New Orleans seems unlikely to let him walk away without some sort of compensation, which Rapoport says would be a second-round pick. However, Payton reportedly has a “change of control” clause in his contract, which would allow him to walk away if Saints owner Tom Benson, 88, is not in charge. Benson and his children and grandchildren are embroiled in a legal dispute over the future of the team’s ownership.

The Eagles also are reportedly interested in Payton if he and the Saints part ways. He was the team’s quarterbacks coach in 1997 and 1998.