This seems to be a quetion from beginner;-)
list every rule which you know,and test one by one.Don't try to find some special formula ,that which one fumular check ,you can judge it' ok or not.forget that,no this fomula.