Deductions & credits

Can I qualify as a NY resident if I was born in Manhattan,and lived in NYC for 5 years until 2012,but than came to my foreign country