Language: C++

#include <bits/stdc++.h>

#define jh(x,y) x^=y^=x^=y

const int N = 100100;

using namespace std;

inline long long read()

{

	register long long num = 0;	register char ch;

	register bool flag = false;

	while ((ch = getchar()) == ' ' || ch == '\n' || ch == '\r');

	if (ch == '-')flag = true; else num = ch ^ 48;

	while ((ch = getchar()) != ' '&&ch != '\n'&&ch != '\r'&&~ch)

		num = num * 10 + (ch ^ 48);

	if (flag)return -num; return num;

}

int zys[N], tot, num[N], ans = 1, n, m;

inline void f(register int n)

{

	register int limit = sqrt(n);

	for (register int i = 2; i <= limit; ++i)

	{

		if (n%i == 0)

		{

			zys[++tot] = i;

			while (n%i == 0)++num[tot], n /= i;

		}

	}

	if (n > 1)zys[++tot] = n, num[tot] = 1;

}

inline void dfs(register int step, register int sum)

{

	if (step == tot + 1)

	{

		if (m / sum >= n && sum > ans)ans = sum;

		return;

	}

	for (register int i = 1; i <= num[step]; ++i)

		dfs(step + 1, sum*zys[step] * i);

	dfs(step + 1, sum);

}

int main()

{

	n = read(), m = read();

	f(m)

Compiler output:
a.cc: In function 'long long int read()':
a.cc:13:28: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   13 |         register long long num = 0;     register char ch;
      |                            ^~~
a.cc:13:55: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   13 |         register long long num = 0;     register char ch;
      |                                                       ^~
a.cc:15:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   15 |         register bool flag = false;
      |                       ^~~~
a.cc: At global scope:
a.cc:31:28: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   31 | inline void f(register int n)
      |                            ^
a.cc: In function 'void f(int)':
a.cc:35:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   35 |         register int limit = sqrt(n);
      |                      ^~~~~
a.cc:37:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   37 |         for (register int i = 2; i <= limit; ++i)
      |                           ^
a.cc: At global scope:
a.cc:57:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   57 | inline void dfs(register int step, register int sum)
      |                              ^~~~
a.cc:57:49: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   57 | inline void dfs(register int step, register int sum)
      |                                                 ^~~
a.cc: In function 'void dfs(int, int)':
a.cc:71:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   71 |         for (register int i = 1; i <= num[step]; ++i)
      |                           ^
a.cc: In function 'int main()':
a.cc:85:13: error: expected ';' at end of input
   85 |         f(m)
      |             ^
      |             ;
a.cc:85:13: error: expected '}' at end of input
a.cc:81:1: note: to match this '{'
   81 | {
      | ^