Check if a M | Java program to check if M - th fibonacci divides N - th fibonacci ; exceptional case for F ( 2 ) ; if none of the above cases , hence not divisible ; Driver Code
import java . io . * ; class GFG { static void check ( int n , int m ) { if ( n == 2 m == 2 n % m == 0 ) { System . out . println ( " Yes " ) ; } else { System . out . println ( " No " ) ; } } public static void main ( String [ ] args ) { int m = 3 , n = 9 ; check ( n , m ) ; } }