ftp use tow ports one for communication 21 and the other for data transfer ,it chose it randomly ,and all ports under 1023 required root access ,so you must make it up 1023 as written in the second rule .
Code:
# pass in ftp traffic
pass in on $interface proto tcp from any to $interface port 21
# pass out ftp trafic
pass out on $interface inet proto tcp from any to any port > 1023