Pair pattern matcher.