HSA state allocation

I live in NJ and work in NY. My wife works in NJ and has HSA deductions taken out of her paycheck. Am I allowed to take that HSA deduction on my NY nonresident tax return? (I know I get a credit in NJ for NY taxes paid, but I think it'll still be more advantageous in my situation to pay less tax in NY)