Just checked for you and York, PA doesn't have an office.
The Pittsburgh office covers the state of West Virginia and the following counties in Pennsylvania: Allegheny, Armstrong, Beaver, Bedford, Blair, Butler, Cambria, Clarion, Clearfield, Crawford, Elk, Erie, Fayette, Forest, Greene, Indiana, Jefferson, Lawrence, McKean, Mercer, Somerset, Venango, Warren, Washington, and Westmoreland.
The Philly office serves the following counties in Pennsylvania: Adams, Berks, Bradford, Bucks, Cameron, Carbon, Centre, Chester, Clinton, Columbia, Cumberland, Dauphin, Delaware, Franklin, Fulton, Huntingdon, Juniata, Lackawana, Lancaster, Lebanon, Lehigh, Luzerne, Lycoming, Mifflin, Monroe, Montgomery, Montour, Northampton, Northumberland, Perry, Philadelphia, Pike, Potter, Schuylkill, Snyder, Sullivan, Susquehanna, Tioga, Union, Wayne, Wyoming, and York.
The best way however is the check with your zip code at
https://egov.uscis.gov/crisgwi/go?action=offices.type&OfficeLocator.office_type=LO