看P521,应该是都可以的
This publication explains the deduction of certain expenses of moving to a
new home because you changed job locations or started a new job.
You can deduct your moving expenses if you meet all three of the following
requirements.
Your move is closely related to the start of work.
You meet the distance test.
You meet the time test.