Check if there exists a prime number which gives Y after being repeatedly subtracted from X | C # implementation of the approach ; Function that returns true if any prime number satisfies the given conditions ; No such prime exists ; Driver code
using System ; class GFG { static bool isPossible ( int x , int y ) { if ( ( x - y ) == 1 ) return false ; return true ; } public static void Main ( String [ ] args ) { int x = 100 , y = 98 ; if ( isPossible ( x , y ) ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }