#include"bits/stdc++.h" using namespace std; bool check(int x){ while(x){ if(x%10==7) return 1; x/=10; } return 0; } int main(){ long long a,b,ans=0; cin>>a>>b; for(int i=a;i<=b;i++){ int s=i; if(i%7==0||check(s))ans++; } cout<<ans<<'\n'; for(int i=a;i<=b;i++){ int s=i; if(i%7==0||check(s))cout<<i<<'\n'; } }