A vehicle arduino robot moves in a plane starting from the origin (0,0). The vehicle can move up, down, turn left, and turn right with a certain number of steps. Write a program to calculate the distance from the current point after a series of movements to the origin? Then, check the distance to know if it is a perfect square or a prime number?