786. K-th Smallest Prime Fraction

class Solution:
    def kthSmallestPrimeFraction(self, arr: List[int], k: int) -> List[int]:    
        d = {}
        for index, i in enumerate(arr):
            for j in arr[index:]:
                d[(i, j)] = i / j

        d = {k : v for k, v in sorted(d.items(), key = lambda x : x[1])}
        x = list(d.keys())[k - 1]

        return x