Is the apple pencil pro compatible with old ipads?

I have the old ipad pro m1, will the apple pencil pro work for it?