There are two new sheriffs in town – Identifying DJMcMego pairs! We have some new sheriffs moderators in town, Mego and DJMcMayhem. We need a challenge to properly honour them for their new positions, so there we go. 

Here's something that has caught my attention when hovering over their profiles –  their user IDs are \$31716\$ and \$45941\$. If you perform digit-wise subtraction, you'll notice something pretty exciting (of course, taking the absolute differences):

3|1|7|1|6
4|5|9|4|1
-+-+-+-+- (-)
1|4|2|3|5


The number generated by the above algorithm is \$14235\$. There is something special about this integer: It consists of consecutive digits only, sorted in  ascending order, but exactly one of the digits is not placed correctly — \$4\$. 

We will call a pair of positive integers \$(a, b)\$ a DJMcMego pair if the digit-wise absolute differences are consecutive integers, sorted in ascending order, but exactly one of them is not where it belongs. That is, it is possible to move exactly one digit of the result of digit-wise subtraction to another position, such that the integer obtained only has consecutive digits, sorted in ascending order. 

In our example above, the pair \$(31716, 45941)\$ is a DJMcMego pair, because if \$4\$ is moved between \$3\$ and \$5\$, the result is \$12345\$, which fulfils the criteria. Note that the digits of the resulting number do not need to start at \$1\$, they just ought to be consecutive. When one is unsure about what decision they should make, they can always rely on the other's help to sort things out. 

Your task is to output a truthy/falsy value depending on whether a pair of positive integers given as input is a DJMcMego pair.


You are guaranteed that \$a\$ and \$b\$ will have the same number of digits, always at least 4.
You can take the integers in any reasonable format (i.e. native integers, strings, lists of digits, etc.)
You can compete in any programming language and can take input and provide output through any standard method, while taking note that these loopholes are forbidden by default. This is code-golf, so the shortest submission (in bytes) for every language wins.


Test cases

a, b -&gt; Output

31716, 45941 -&gt; Truthy
12354, 11111 -&gt; Truthy
56798, 22222 -&gt; Truthy
23564, 11111 -&gt; Truthy
1759,  2435  -&gt; Truthy
12345, 11111 -&gt; Falsy
3333,  2101  -&gt; Falsy
22354, 22222 -&gt; Falsy
31717, 45941 -&gt; Falsy
14325, 11111 -&gt; Falsy
89789, 78865 -&gt; Falsy
14954, 61713 -&gt; Falsy
25631, 11114 -&gt; Falsy


Or, in another format.
C (gcc), 259 258 254 253 250 248 233 222 bytes


Thanks to Stan Strum for inspring a one byte golf.
Saved four bytes by juggling some variable initializations.
Saved a byte by golfing for(...;l++)b*=B[l]==-~B[l-1]; to for(...;b*=B[l]==-~B[~-l++]); (most likely relying on undefined behaviour, as it requires first evaluating B[l] followed by -~B[~-l++]).
Saved three five bytes.
Saved fifteen twenty-six bytes thanks to ceilingcat.




j,k,l,L,r,b;f(char*A,char*B){for(j=r=0;k=A[L=j];)A[j++]=-~abs(A[j]-B[j]);for(;k-L;k++)for(j=~0;L-++j;r|=!b)if(k-j)for(bcopy(B-~l,strcpy(B,A)+l,strlen(A+l)),bcopy(B+j,B-~j,L+~j),B[j]=A[k],l=b=0;B[++l];b|=B[l]+~B[~-l]);A=r;}


Try it online!

Explanation (248 byte version)



j,k,l,L,r,b;                            // global variables
f(char*A,char*B){                       // function takes two strings
 for(j=r=0;A[j];L=j)                    // loop through A, compute array length L
  A[j++]=-~abs(A[j]-B[j]);              // set every entry in A to the absolute
                                        // difference of A and B at that position
                                        /* Test out all possible movements of        *
                                         * characters and see if any one             *
                                         * results in a sorted list =&gt; DJMcMego pair */
 for(j=0;j-L;j++)                       // loop through array
  for(k=~0;L-++k;r|=!b)                 // loop through array
   if(j-k){                             // j is not equal to k
    for(l=0;A[l];B[l++]=A[l]);          // copy A to B
    for(l=j;A[l];B[~-l]=B[++l]);        // shift part of B
    for(l=L;l-k;B[-~l]=B[--l]);         // shift part of B
    B[k]=A[j];                          // insert character at correct position
    for(l=b=0;B[++l];b|=B[l]+~B[~-l]);} // test if B is sorted
 A=r;}                                  // return if there was a DJMcMego pair found


Try it online!