public int factGCD(int a, int b)
	{
		HashMap<Integer, Integer> mapB = getMap(b);
		int result = 1;
		for (Integer p : mapB.keySet()) {
			int tmp = a;
			int sum = 0;
			while (tmp > 1) {
				int k = tmp / p;
				sum += k;
				tmp = k;
			}
			result *= Math.pow(p, Math.min(mapB.get(p), sum));
		}
		return result;

	}