Check whether two convex regular polygon have same center or not | Java implementation to check whether two convex polygons have same center ; Function to check whether two convex polygons have the same center or not ; Driver Code
class GFG { static int check ( int n , int m ) { if ( m % n == 0 ) { System . out . print ( " YES " ) ; } else { System . out . print ( " NO " ) ; } return 0 ; } public static void main ( String [ ] args ) { int n = 5 ; int m = 10 ; check ( n , m ) ; } }