The Internet nowadays is getting demanded to provide better services, and hence next generation routers are required to perform intelligent packet classification. For given a classifier defining packet attributes or contents, packet classification is the process of identifying the highest priority rule to which a packet conforms. A notable characteristic of real classifiers is that a packet matches only a small number of distinct source-destination prefix pairs. Therefore, a lot of packet classification schemes have been proposed to filter rules based on source and destination prefix fields. However, most of the schemes are based on trie structure and sequential one-dimensional searches in each prefix as well as they require huge memory size. In this paper, we proposed a memory-efficient two-dimensional search scheme using source and destination prefix pairs. By constructing codeword binary prefix tree, source prefix search and destination prefix search are simultaneously performed in a single binary prefix tree. Moreover, the proposed two-dimensional binary prefix tree does not include any empty internal nodes, and therefore, memory waste of previous trie-based structures is completely eliminated.