peg; move RSA check in a separate function
peg; move RSA check in a separate function

M4573R/competitive-programming-archive,gshopov/competitive-programming-archive,gshopov/competitive-programming-archive,gshopov/competitive-programming-archive,M4573R/competitive-programming-archive