isRotation and isSubSequence