NYC is LGA and JFK only. Usually, NYC, EWR, HPN and ISP are co-terminals with one another.
If a fare is applicable to only LGA, or only JFK, the fare is a NYC fare with an airport-specific rule. A NYC fare cannot be used to fly to EWR (except maybe as a standby).