Is this relationship creepy?
Python 3, 26 bytes
lambda x:max(x)/2+7>min(x)
Try it online!
The input is a list with both ages
05AB1E, 8 6 bytes
;7+R‹Z
Try it online! or Try all test
# Implicit Input: an array of the ages
; # Divide both ages by 2
7+ # Add 7 to both ages
R # Reverse the order of the ages
# this makes the "minimum age" line up with the partner's actual age
‹ # Check for less than the input (vectorized)
Z # Push largest value in the list
NAND gates, 551
Created with Logisim
Same principle as my other answer, but takes 2-byte signed inputs, so it can handle 47, 10000
. Works for ALL test cases!
This is not optimal for the given test cases, as 10000 can be expressed with only 15 of the 16 bits, but it works for any ages in the range [-32768, 32768). Note that any negative age will return 1
.
Inputs on left (no particular order, 1-bit on top). Output in lower right.