I revised my suggestion one more time with the simple math. If this is wrong again, I am not smarter than a 3rd grader.
DECLARE @t table (Id int IDENTITY(1,1), Dup1 int, Dup2 int)
INSERT INTO @t (Dup1, Dup2)
VALUES
(20, 1),
(5, 4),
(4, 5),
(10, 2),
(2, 10),
(2147483640, 2147483647),
(2147483647, 2147483640),
(2147483640, -2147483647),
(-2147483647, 2147483640);
-- Naomi's suggestion
;WITH cte AS (
SELECT *, ROW_NUMBER() OVER (PARTITION BY Dup1 + CAST(Dup2 AS bigint), abs(Dup1-cast(Dup2 as bigint)) ORDER BY Id) AS Rn
FROM @t
)
SELECT *
FROM cte
WHERE Rn > 1; -- possible dups
-- Hunchback's suggestion
;WITH cte AS (
SELECT
*, ROW_NUMBER() OVER (
PARTITION BY CASE WHEN Dup1 <= Dup2 THEN Dup1 ELSE Dup2 END, CASE WHEN Dup1 <= Dup2 THEN Dup2 ELSE Dup1 END
ORDER BY Id) AS Rn
FROM @t
)
SELECT *
FROM cte
WHERE Rn > 1; -- possible dups
GO