SAN FAN-CISCO: Astoria native Tony Bennett, “left his heart in San Francisco.” The City by the Bay stole the Willie Mays and the Baseball Giants from New York, and the Football Giants later coaxed Y.A. Tittle to the Big Apple. Yet there is little animosity between San Francisco and New York.Getty Images (left); AP (2)

(
)

When you think about it, San Francisco has gotten away easy over the years.

Los Angeles is the city we detest, the city in which all of our ugliest impulses are manifest, the town with the beautiful weather and the beautiful people who arrive to ballgames late and leave early and stole the Dodgers away from us (to say nothing of stealing the Lakers from Minneapolis and the Rams from Cleveland and the Raiders from Oakland).

L.A. has done a number on us over the years. Jack Nicholson, who has been a courtside stalwart at Lakers games for years? Born in our very own late, lamented St. Vincent’s Hospital, raised in Neptune, N.J. Frank Sinatra, Hoboken’s own, went mad and adopted the Dodgers in September of his years, a more regrettable late-life decision than the “Mack the Knife” duet he did with Jimmy Buffet.

Frisco? (And, yes, I know how much San Franciscans hate it when outsiders call it that. I’m trying to goad you.)

Its most egregious felony was stealing the years 1958 through 1971 from us, which also happened to be the prime of Willie Mays’ career, after his initial emergence with the Giants and before his sad denouement with the Mets.

Oh, we’ve sought payback for that outrage in the interim. We coaxed you into giving us Y.A. Tittle not long after, and that worked for a while, Tittle put on quite the offensive show every Sunday at Yankee Stadium and was a member of the Giants’ Toots Shor varsity at night … but the eternal picture of Tittle isn’t of him filling the sky with spirals but on his knees in an end zone at Pittsburgh’s Forbes Field, battered and bloodied and bald.

We stole Rick Barry away from you for a couple of years, in the early ’70s, in between his stints with the NBA Warriors in San Francisco and Oakland, and he helped lead the Nets to the ABA Finals one year while he was playing for Lou Carnesecca. But half his time here, he played in the ramshackle Island Garden in West Hempstead, and since that coincided with the Knicks’ most glorious glory days, he didn’t so much play in the shadows as in the shadows’ shadows. By the end he was practically willing to walk back to Northern California.

We have eyed you warily from afar. We’ve seen you turn Dirty Harry Callahan and Frank Bullitt — who would have fit right at home in the NYPD if we would have dreamt them up first — into folk heroes. You gave us the Grateful Dead and Big Brother and the Holding Company (thank you) and Journey and Huey Lewis (1984 thanks you), and you stood idly by while allowing the great Jefferson Airplane to somehow become Starship.

If we ever have come close to making a fair swap for the Say Hey Kid, it might have been on an inspired autumn day in 1953 when a pair of amateur songwriters, George Cory and Douglass Cross, looked out the window of their Brooklyn Heights apartment, peered at one beautiful bridge and started pining for another, back in their hometown.

They sat down and wrote a song they tentatively titled “When I Come Home.” Nine years later the tune found its way to a singer from Astoria named Tony Bennett. And thanks to that unlikely partnership of Brooklyn and Queens, an anthem — “I Left My Heart in San Francisco” — was born.

You’re welcome.

Maybe the reason we tolerate San Francisco so much more than L.A. is this: They care the way we care. You looked at the people going wild at Candlestick last week during that crazy Saints game, it looked far more NYC than Cali. And hey, when the Giants won the World Series two years ago, one of the daily highlights of their home games was watching Journey’s own — and San Francisco’s own — Steve Perry singing along with everyone else to “Don’t Stop Believing” and “Lights” during the seventh-inning stretch.

They are cool, but not too cool, and the games matter to them, and not just as places to be seen. Hopefully, that sounds familiar.