Recent grads can’t afford to live where they’re likely to find work.

In just four cities in America — Washington D.C., San Jose, San Francisco, and Houston — recent college grads ages 22-27 earn a median of more than $3,000 a month, according to a study released Wednesday from real estate site Trulia and job site Indeed. (Though in both San Jose and San Francisco, which have median rents of $3,500 and $4,100 respectively, grads would might help from their parents just to afford an apartment; they’d also struggle in Houston with a median rent of $1,550 and D.C. at $2,100).

10 cities where incomes are highest for recent grads
Median monthly personal incomes, by metro area

Washington D.C. $3,337
San Jose $3,333
San Francisco $3,250
Houston $3,188
New York $2,993
Boston $2,968
Dallas $2,925
Hartford $2,890
Baltimore $2,882
Kansas City $2,753

The Washington D.C. area takes the top spot at more than $3,300 a month; that’s thanks, in part, to a number of prestigious universities in the area and high-paying jobs at think tanks and in lobbying organizations, explains Ralph McLaughlin, chief economist at Trulia. San Jose and San Francisco areas take the No. 2 and No. 3 spots, thanks to a plethora of tech jobs, as well as high-paying jobs in finance and other fields that support the tech industry, he explains.

Many of these same cities also have a high percentage of openings in jobs that are recent-grad-friendly (defined as jobs that have a high percentage of recent grads doing them).  The San Francisco, San Jose and Seattle areas top this list because of the myriad tech positions in each.

10 cities with a lot of jobs for recent grads
Percentage of grad-friendly job listings, by metro area

San Jose 31.6%
San Francisco 26.8%
Seattle 23.7%
Boston 23.3%
Bridgeport 23.3%
Washington D.C. 23.2%
New York 22.8%
San Diego 21.5%
Los Angeles 20%
Baltimore 19.9%

The problem: Many of the places that pay well and have lots of grad-friendly jobs are pricey to live in — even if you’re making more than $3,000 a month. “Good job markets go hand-in-hand with expensive housing,” Trulia notes. Indeed, it’s mostly cities in Ohio — including Dayton, Youngstown, Akron and Toledo — that top the list of most affordable, while it’s high-rent places like San Francisco that have both lots of job openings and high pay.

One city pops up on both the top-10 list of cities with high incomes for grads and affordable rents: Kansas City.  McLaughlin notest that Kansas City boasts a stable housing market (it’s didn’t boom and bust too much during the housing bubble), as well as a number of jobs in occupations that pay well. It is an agricultural hub, so there are plenty of jobs doing things like supply chain management, as well as working for insurance companies and at spots like Russell Stover or the Federal Reserve.