<>;for(<>){print$_-2?($_-1)**2:2,$/}